1
0
Fork 0

GUI: added graph background color customization

This commit is contained in:
mrexodia 2016-09-04 01:50:10 +02:00
parent 184621c1e5
commit 1e170f01ff
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
4 changed files with 7 additions and 1 deletions

View File

@ -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");

View File

@ -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();
}

View File

@ -303,6 +303,7 @@ private:
QColor brtrueColor;
QColor brfalseColor;
QColor retShadowColor;
QColor backgroundColor;
protected:
#include "ActionHelpers.h"
};

View File

@ -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"));