summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/mapping-dialog.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp
index 6dc6d15f..af35c999 100644
--- a/gui/mapping-dialog.cpp
+++ b/gui/mapping-dialog.cpp
@@ -28,21 +28,13 @@ mapping_dialog::mapping_dialog(Mappings& m) : m(m), widgets{}
};
{
- QColor bg = palette().background().color();
+ QColor bg = palette().window().color();
QString tmp;
tmp.reserve(32);
- tmp += QStringLiteral(".QWidget { background-color: #");
-
- for (int i : { bg.red(), bg.green(), bg.blue() })
- {
- if (i < 0xf0)
- tmp += '0';
- tmp += QString::number(i, 16);
- }
-
- tmp += "; }";
+ tmp += QStringLiteral(".QWidget { background-color: rgb(%1, %2, %3); } ")
+ .arg(bg.red()).arg(bg.green()).arg(bg.blue());
for (QWidget* w : pages)
w->setStyleSheet(tmp);