GUI: added graph background color customization
This commit is contained in:
parent
184621c1e5
commit
1e170f01ff
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ private:
|
|||
QColor brtrueColor;
|
||||
QColor brfalseColor;
|
||||
QColor retShadowColor;
|
||||
QColor backgroundColor;
|
||||
protected:
|
||||
#include "ActionHelpers.h"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue