Additional updates to make coloring better for dark themes

This commit is contained in:
Collin Kidder
2019-02-26 22:20:45 -05:00
parent 5d427e8db4
commit 75c2693a97
4 changed files with 33 additions and 8 deletions
+14 -2
View File
@@ -7,14 +7,26 @@
SnifferDelegate::SnifferDelegate(QWidget *parent) : QItemDelegate(parent)
{
QColor TextColor = QApplication::palette().color(QPalette::Text);
if (TextColor.red() + TextColor.green() + TextColor.blue() < 200)
{
mDarkMode = false;
redBrush = QBrush(Qt::red);
greenBrush = QBrush(Qt::green);
}
else
{
mDarkMode = true;
redBrush = QBrush(QColor(128,0,0));
greenBrush = QBrush(QColor(0,128,0));
}
blackBrush = QBrush(Qt::black);
whiteBrush = QBrush(Qt::white);
redBrush = QBrush(Qt::red);
greenBrush = QBrush(Qt::green);
grayBrush = QBrush(QColor(230,230,230));
mainFont.setPointSize(10);
mainFontInfo = new QFontInfo(mainFont);
mFadeInactive = false;
}
bool SnifferDelegate::getFadeInactive()