Fix disassembly colors (#617)

* Fix loading colors from radare
This commit is contained in:
Adam Zambrzycki 2018-08-15 10:45:15 +02:00 committed by xarkes
parent f98a175c5c
commit 0c7b8f09be
3 changed files with 5 additions and 2 deletions

@ -1 +1 @@
Subproject commit 404e4a1b74df7941c3ff7511f5396e1e1736ce37 Subproject commit 7e04582718f5463777bbc7e74cd706a81ca4d414

View File

@ -265,7 +265,7 @@ void Configuration::setColorTheme(QString theme)
QJsonObject colorsObject = colors.object(); QJsonObject colorsObject = colors.object();
QJsonObject::iterator it; QJsonObject::iterator it;
for (it = colorsObject.begin(); it != colorsObject.end(); it++) { for (it = colorsObject.begin(); it != colorsObject.end(); it++) {
if (!it.key().contains("graph")) if (it.key().contains("gui"))
continue; continue;
QJsonArray rgb = it.value().toArray(); QJsonArray rgb = it.value().toArray();
s.setValue("colors." + it.key(), QColor(rgb[0].toInt(), rgb[1].toInt(), rgb[2].toInt())); s.setValue("colors." + it.key(), QColor(rgb[0].toInt(), rgb[1].toInt(), rgb[2].toInt()));

View File

@ -1,6 +1,7 @@
/* x64dbg RichTextPainter */ /* x64dbg RichTextPainter */
#include "RichTextPainter.h" #include "RichTextPainter.h"
#include "CachedFontMetrics.h" #include "CachedFontMetrics.h"
#include "utils/Configuration.h"
#include <QPainter> #include <QPainter>
#include <QTextBlock> #include <QTextBlock>
#include <QTextFragment> #include <QTextFragment>
@ -21,6 +22,8 @@ void RichTextPainter::paintRichText(QPainter *painter, int x, int y, int w, int
break; break;
switch (curRichText.flags) { switch (curRichText.flags) {
case FlagNone: //defaults case FlagNone: //defaults
pen.setColor(ConfigColor("btext").name());
painter->setPen(pen);
break; break;
case FlagColor: //color only case FlagColor: //color only
pen.setColor(curRichText.textColor); pen.setColor(curRichText.textColor);