summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/mapping-window.cpp30
-rw-r--r--gui/mapping-window.ui84
2 files changed, 30 insertions, 84 deletions
diff --git a/gui/mapping-window.cpp b/gui/mapping-window.cpp
index 46224078..0d2c9fbb 100644
--- a/gui/mapping-window.cpp
+++ b/gui/mapping-window.cpp
@@ -14,6 +14,36 @@ MapWidget::MapWidget(Mappings& m) : m(m), widgets{}
{
ui.setupUi(this);
+ QWidget* pages[] = {
+ ui.tabWidgetPage1,
+ ui.tabWidgetPage2,
+ ui.tabWidgetPage3,
+ ui.tabWidgetPage4,
+ ui.tabWidgetPage5,
+ ui.tabWidgetPage6,
+ };
+
+ {
+ QColor bg = palette().background().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 += "; }";
+
+ for (QWidget* w : pages)
+ w->setStyleSheet(tmp);
+ }
+
load();
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
diff --git a/gui/mapping-window.ui b/gui/mapping-window.ui
index 4ef77cb8..c37c4b3e 100644
--- a/gui/mapping-window.ui
+++ b/gui/mapping-window.ui
@@ -93,13 +93,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -118,13 +111,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -181,13 +167,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -206,13 +185,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -269,13 +241,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -294,13 +259,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -361,13 +319,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -386,13 +337,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -449,13 +393,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -474,13 +411,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -537,13 +467,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -562,13 +485,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>