mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Improve Graph Overview Fill and node Colors (#1596)
This commit is contained in:
parent
c141eb34cc
commit
f9f8e90ac6
@ -24,6 +24,8 @@ const QStringList ColorThemeWorker::cutterSpecificOptions = {
|
||||
"gui.disass_selected",
|
||||
"gui.breakpoint_background",
|
||||
"gui.overview.node",
|
||||
"gui.overview.fill",
|
||||
"gui.overview.border",
|
||||
"gui.border",
|
||||
"gui.background",
|
||||
"gui.alt_background",
|
||||
|
@ -254,6 +254,8 @@ void Configuration::loadNativeTheme()
|
||||
setColor("gui.tooltip.background", QColor(42, 44, 46));
|
||||
setColor("gui.tooltip.foreground", QColor(250, 252, 254));
|
||||
setColor("gui.dataoffset", QColor(255, 255, 255));
|
||||
setColor("gui.overview.fill", QColor(255, 255, 255, 40));
|
||||
setColor("gui.overview.border", QColor(99, 218, 232, 50));
|
||||
} else {
|
||||
setColor("gui.border", QColor(0, 0, 0));
|
||||
setColor("gui.background", QColor(255, 255, 255));
|
||||
@ -263,6 +265,8 @@ void Configuration::loadNativeTheme()
|
||||
setColor("wordHighlight", QColor(179, 119, 214, 60));
|
||||
setColor("highlightPC", QColor(214, 255, 210));
|
||||
setColor("gui.dataoffset", QColor(0, 0, 0));
|
||||
setColor("gui.overview.fill", QColor(175, 217, 234, 65));
|
||||
setColor("gui.overview.border", QColor(99, 218, 232, 50));
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,6 +302,11 @@ void Configuration::loadLightTheme()
|
||||
setColor("gui.navbar.err", QColor(3, 170, 245));
|
||||
setColor("gui.tooltip.background", QColor(250, 252, 254));
|
||||
setColor("gui.tooltip.foreground", QColor(42, 44, 46));
|
||||
|
||||
// Graph Overview
|
||||
setColor("gui.overview.node", QColor(245, 250, 255));
|
||||
setColor("gui.overview.fill", QColor(175, 217, 234, 65));
|
||||
setColor("gui.overview.border", QColor(99, 218, 232, 50));
|
||||
}
|
||||
|
||||
void Configuration::loadBaseThemeDark()
|
||||
@ -347,7 +356,10 @@ void Configuration::loadBaseThemeDark()
|
||||
setColor("highlightPC", QColor(87, 26, 7));
|
||||
setColor("gui.breakpoint_background", QColor(140, 76, 76));
|
||||
|
||||
// Graph Overview
|
||||
setColor("gui.overview.node", QColor(100, 100, 100));
|
||||
setColor("gui.overview.fill", QColor(255, 255, 255, 40));
|
||||
setColor("gui.overview.border", QColor(99, 218, 232, 50));
|
||||
}
|
||||
|
||||
void Configuration::loadDarkTheme()
|
||||
|
@ -702,6 +702,18 @@ const QMap<QString, OptionInfo> optionInfoMap__ = {
|
||||
QObject::tr("Graph Overview node")
|
||||
}
|
||||
},
|
||||
{
|
||||
"gui.overview.fill", {
|
||||
QObject::tr("Fill color of Graph Overview's selection"),
|
||||
QObject::tr("Graph Overview fill")
|
||||
}
|
||||
},
|
||||
{
|
||||
"gui.overview.border", {
|
||||
QObject::tr("Border color of Graph Overview's selection"),
|
||||
QObject::tr("Graph Overview border")
|
||||
}
|
||||
},
|
||||
{
|
||||
"gui.cflow", {
|
||||
"",
|
||||
|
@ -78,7 +78,8 @@ void OverviewView::paintEvent(QPaintEvent *event)
|
||||
return;
|
||||
}
|
||||
QPainter p(viewport());
|
||||
p.setPen(Qt::red);
|
||||
p.setPen(graphSelectionBorder);
|
||||
p.setBrush(graphSelectionFill);
|
||||
p.drawRect(rangeRect);
|
||||
}
|
||||
|
||||
@ -138,6 +139,8 @@ void OverviewView::colorsUpdatedSlot()
|
||||
disassemblyBackgroundColor = ConfigColor("gui.overview.node");
|
||||
graphNodeColor = ConfigColor("gui.border");
|
||||
backgroundColor = ConfigColor("gui.background");
|
||||
graphSelectionFill = ConfigColor("gui.overview.fill");
|
||||
graphSelectionBorder = ConfigColor("gui.overview.border");
|
||||
setCacheDirty();
|
||||
refreshView();
|
||||
}
|
||||
|
@ -115,6 +115,16 @@ private:
|
||||
*/
|
||||
QColor graphNodeColor;
|
||||
|
||||
/**
|
||||
* @brief fill color of the selection rectangle
|
||||
*/
|
||||
QColor graphSelectionFill;
|
||||
|
||||
/**
|
||||
* @brief border color of the selection rectangle
|
||||
*/
|
||||
QColor graphSelectionBorder;
|
||||
|
||||
/**
|
||||
* @brief edgeConfigurations edge styles computed by DisassemblerGraphView
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user