From 0c7b8f09be8f78ef4ebb39440c8b4217eefa09ca Mon Sep 17 00:00:00 2001 From: Adam Zambrzycki Date: Wed, 15 Aug 2018 10:45:15 +0200 Subject: [PATCH] Fix disassembly colors (#617) * Fix loading colors from radare --- radare2 | 2 +- src/utils/Configuration.cpp | 2 +- src/utils/RichTextPainter.cpp | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/radare2 b/radare2 index 404e4a1b..7e045827 160000 --- a/radare2 +++ b/radare2 @@ -1 +1 @@ -Subproject commit 404e4a1b74df7941c3ff7511f5396e1e1736ce37 +Subproject commit 7e04582718f5463777bbc7e74cd706a81ca4d414 diff --git a/src/utils/Configuration.cpp b/src/utils/Configuration.cpp index ae215d95..ac501f1e 100644 --- a/src/utils/Configuration.cpp +++ b/src/utils/Configuration.cpp @@ -265,7 +265,7 @@ void Configuration::setColorTheme(QString theme) QJsonObject colorsObject = colors.object(); QJsonObject::iterator it; for (it = colorsObject.begin(); it != colorsObject.end(); it++) { - if (!it.key().contains("graph")) + if (it.key().contains("gui")) continue; QJsonArray rgb = it.value().toArray(); s.setValue("colors." + it.key(), QColor(rgb[0].toInt(), rgb[1].toInt(), rgb[2].toInt())); diff --git a/src/utils/RichTextPainter.cpp b/src/utils/RichTextPainter.cpp index b4232421..85e4a33e 100644 --- a/src/utils/RichTextPainter.cpp +++ b/src/utils/RichTextPainter.cpp @@ -1,6 +1,7 @@ /* x64dbg RichTextPainter */ #include "RichTextPainter.h" #include "CachedFontMetrics.h" +#include "utils/Configuration.h" #include #include #include @@ -21,6 +22,8 @@ void RichTextPainter::paintRichText(QPainter *painter, int x, int y, int w, int break; switch (curRichText.flags) { case FlagNone: //defaults + pen.setColor(ConfigColor("btext").name()); + painter->setPen(pen); break; case FlagColor: //color only pen.setColor(curRichText.textColor);