mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +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.disass_selected",
|
||||||
"gui.breakpoint_background",
|
"gui.breakpoint_background",
|
||||||
"gui.overview.node",
|
"gui.overview.node",
|
||||||
|
"gui.overview.fill",
|
||||||
|
"gui.overview.border",
|
||||||
"gui.border",
|
"gui.border",
|
||||||
"gui.background",
|
"gui.background",
|
||||||
"gui.alt_background",
|
"gui.alt_background",
|
||||||
|
@ -254,6 +254,8 @@ void Configuration::loadNativeTheme()
|
|||||||
setColor("gui.tooltip.background", QColor(42, 44, 46));
|
setColor("gui.tooltip.background", QColor(42, 44, 46));
|
||||||
setColor("gui.tooltip.foreground", QColor(250, 252, 254));
|
setColor("gui.tooltip.foreground", QColor(250, 252, 254));
|
||||||
setColor("gui.dataoffset", QColor(255, 255, 255));
|
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 {
|
} else {
|
||||||
setColor("gui.border", QColor(0, 0, 0));
|
setColor("gui.border", QColor(0, 0, 0));
|
||||||
setColor("gui.background", QColor(255, 255, 255));
|
setColor("gui.background", QColor(255, 255, 255));
|
||||||
@ -263,6 +265,8 @@ void Configuration::loadNativeTheme()
|
|||||||
setColor("wordHighlight", QColor(179, 119, 214, 60));
|
setColor("wordHighlight", QColor(179, 119, 214, 60));
|
||||||
setColor("highlightPC", QColor(214, 255, 210));
|
setColor("highlightPC", QColor(214, 255, 210));
|
||||||
setColor("gui.dataoffset", QColor(0, 0, 0));
|
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.navbar.err", QColor(3, 170, 245));
|
||||||
setColor("gui.tooltip.background", QColor(250, 252, 254));
|
setColor("gui.tooltip.background", QColor(250, 252, 254));
|
||||||
setColor("gui.tooltip.foreground", QColor(42, 44, 46));
|
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()
|
void Configuration::loadBaseThemeDark()
|
||||||
@ -347,7 +356,10 @@ void Configuration::loadBaseThemeDark()
|
|||||||
setColor("highlightPC", QColor(87, 26, 7));
|
setColor("highlightPC", QColor(87, 26, 7));
|
||||||
setColor("gui.breakpoint_background", QColor(140, 76, 76));
|
setColor("gui.breakpoint_background", QColor(140, 76, 76));
|
||||||
|
|
||||||
|
// Graph Overview
|
||||||
setColor("gui.overview.node", QColor(100, 100, 100));
|
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()
|
void Configuration::loadDarkTheme()
|
||||||
|
@ -702,6 +702,18 @@ const QMap<QString, OptionInfo> optionInfoMap__ = {
|
|||||||
QObject::tr("Graph Overview node")
|
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", {
|
"gui.cflow", {
|
||||||
"",
|
"",
|
||||||
|
@ -78,7 +78,8 @@ void OverviewView::paintEvent(QPaintEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QPainter p(viewport());
|
QPainter p(viewport());
|
||||||
p.setPen(Qt::red);
|
p.setPen(graphSelectionBorder);
|
||||||
|
p.setBrush(graphSelectionFill);
|
||||||
p.drawRect(rangeRect);
|
p.drawRect(rangeRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,6 +139,8 @@ void OverviewView::colorsUpdatedSlot()
|
|||||||
disassemblyBackgroundColor = ConfigColor("gui.overview.node");
|
disassemblyBackgroundColor = ConfigColor("gui.overview.node");
|
||||||
graphNodeColor = ConfigColor("gui.border");
|
graphNodeColor = ConfigColor("gui.border");
|
||||||
backgroundColor = ConfigColor("gui.background");
|
backgroundColor = ConfigColor("gui.background");
|
||||||
|
graphSelectionFill = ConfigColor("gui.overview.fill");
|
||||||
|
graphSelectionBorder = ConfigColor("gui.overview.border");
|
||||||
setCacheDirty();
|
setCacheDirty();
|
||||||
refreshView();
|
refreshView();
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,16 @@ private:
|
|||||||
*/
|
*/
|
||||||
QColor graphNodeColor;
|
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
|
* @brief edgeConfigurations edge styles computed by DisassemblerGraphView
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user