summaryrefslogtreecommitdiffstats
path: root/randomtab.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-11-23 14:17:09 +0100
committerArno <arno@disconnect.de>2018-11-23 14:17:09 +0100
commit7fd099fb737d625befa6f04dcfad1f6c74705e14 (patch)
tree2864b6177561e142f325d03c9f9b6785cb113748 /randomtab.cpp
parent8c932c2d21e35fe5b446f80643f3b0ecf19b177d (diff)
downloadSheMov-7fd099fb737d625befa6f04dcfad1f6c74705e14.tar.gz
SheMov-7fd099fb737d625befa6f04dcfad1f6c74705e14.tar.bz2
SheMov-7fd099fb737d625befa6f04dcfad1f6c74705e14.zip
Use palette colors where applicable
Don't assume we know what color ought to use. Ask the palette where applicable, but keep the modified configuration options.
Diffstat (limited to 'randomtab.cpp')
-rw-r--r--randomtab.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/randomtab.cpp b/randomtab.cpp
index 93113b7..2907d86 100644
--- a/randomtab.cpp
+++ b/randomtab.cpp
@@ -29,6 +29,7 @@
#include <QAction>
#include <QMenu>
#include <QContextMenuEvent>
+#include <QApplication>
#include <algorithm>
#include <random>
@@ -130,7 +131,8 @@ void RandomTab::setupGui(){
mContextMenu->addAction(goA);
QGroupBox *miscBox = new QGroupBox(tr("Misc."));
- QPushButton *miscB = new QPushButton(Helper::icon(QColor(0, 0, 0, 0), Qt::black, QChar(0x26A4), true, false), tr("Global..."));
+ QColor brushColor = qApp->palette().color(QPalette::Text);
+ QPushButton *miscB = new QPushButton(Helper::icon(QColor(0, 0, 0, 0), brushColor, QChar(0x26A4), true, false), tr("Global..."));
miscB->setMenu(SmGlobals::instance()->globalAction()->menu());
QHBoxLayout *miscL = new QHBoxLayout;
miscL->addWidget(miscB);