diff --git a/src/gui/Src/Gui/AppearanceDialog.cpp b/src/gui/Src/Gui/AppearanceDialog.cpp index 66a55665..77c18223 100644 --- a/src/gui/Src/Gui/AppearanceDialog.cpp +++ b/src/gui/Src/Gui/AppearanceDialog.cpp @@ -534,6 +534,7 @@ void AppearanceDialog::colorInfoListInit() colorInfoListAppend(tr("True branch line"), "GraphBrtrueColor", ""); colorInfoListAppend(tr("False branch line"), "GraphBrfalseColor", ""); colorInfoListAppend(tr("Terminal node shadow"), "GraphRetShadowColor", ""); + colorInfoListAppend(tr("Background"), "", "GraphBackgroundColor"); colorInfoListAppend(tr("Other:"), "", ""); colorInfoListAppend(tr("Current Thread"), "ThreadCurrentColor", "ThreadCurrentBackgroundColor"); diff --git a/src/gui/Src/Gui/DisassemblerGraphView.cpp b/src/gui/Src/Gui/DisassemblerGraphView.cpp index 21308091..82762db5 100644 --- a/src/gui/Src/Gui/DisassemblerGraphView.cpp +++ b/src/gui/Src/Gui/DisassemblerGraphView.cpp @@ -316,7 +316,7 @@ void DisassemblerGraphView::paintEvent(QPaintEvent* event) //Render background QRect viewportRect = this->viewport()->rect(); - p.setBrush(QBrush(disassemblySelectionColor)); + p.setBrush(QBrush(backgroundColor)); p.drawRect(viewportRect); p.setBrush(Qt::black); @@ -1351,6 +1351,9 @@ void DisassemblerGraphView::colorsUpdatedSlot() brtrueColor = ConfigColor("GraphBrtrueColor"); brfalseColor = ConfigColor("GraphBrfalseColor"); retShadowColor = ConfigColor("GraphRetShadowColor"); + backgroundColor = ConfigColor("GraphBackgroundColor"); + if(!backgroundColor.alpha()) + backgroundColor = disassemblySelectionColor; fontChanged(); } diff --git a/src/gui/Src/Gui/DisassemblerGraphView.h b/src/gui/Src/Gui/DisassemblerGraphView.h index 7969858b..4ef7e751 100644 --- a/src/gui/Src/Gui/DisassemblerGraphView.h +++ b/src/gui/Src/Gui/DisassemblerGraphView.h @@ -303,6 +303,7 @@ private: QColor brtrueColor; QColor brfalseColor; QColor retShadowColor; + QColor backgroundColor; protected: #include "ActionHelpers.h" }; diff --git a/src/gui/Src/Utils/Configuration.cpp b/src/gui/Src/Utils/Configuration.cpp index c6d6e319..d574fc7c 100644 --- a/src/gui/Src/Utils/Configuration.cpp +++ b/src/gui/Src/Utils/Configuration.cpp @@ -167,6 +167,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false) defaultColors.insert("GraphBrtrueColor", QColor("#387804")); defaultColors.insert("GraphBrfalseColor", QColor("#ED4630")); defaultColors.insert("GraphRetShadowColor", QColor("#900000")); + defaultColors.insert("GraphBackgroundColor", Qt::transparent); defaultColors.insert("ThreadCurrentColor", QColor("#FFFFFF")); defaultColors.insert("ThreadCurrentBackgroundColor", QColor("#000000"));