Add highlight color and focus color to theme customization.

This commit is contained in:
Paddle
2023-07-31 16:06:01 +02:00
committed by Chris Hennes
parent d200dca4b0
commit 236bd2c189
2 changed files with 70 additions and 0 deletions

View File

@@ -60,6 +60,8 @@ DlgSettingsTheme::~DlgSettingsTheme()
void DlgSettingsTheme::saveSettings()
{
ui->ThemeSecondaryColor->onSave();
ui->ThemeHighlightColor->onSave();
ui->ThemeFocusColor->onSave();
if (styleSheetChanged)
saveStyleSheet();
@@ -68,6 +70,8 @@ void DlgSettingsTheme::saveSettings()
void DlgSettingsTheme::loadSettings()
{
ui->ThemeSecondaryColor->onRestore();
ui->ThemeHighlightColor->onRestore();
ui->ThemeFocusColor->onRestore();
loadStyleSheet();
}

View File

@@ -75,6 +75,72 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel">
<property name="text">
<string>Highlight color</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::PrefColorButton" name="ThemeHighlightColor">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>This color might be used by your theme to let you customize it.</string>
</property>
<property name="color" stdset="0">
<color>
<red>85</red>
<green>123</green>
<blue>182</blue>
</color>
</property>
<property name="prefEntry" stdset="0">
<cstring>ThemeHighlightColor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Themes</cstring>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel">
<property name="text">
<string>Focus theme color</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Gui::PrefColorButton" name="ThemeFocusColor">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>This color might be used by your theme to let you customize it.</string>
</property>
<property name="color" stdset="0">
<color>
<red>85</red>
<green>123</green>
<blue>182</blue>
</color>
</property>
<property name="prefEntry" stdset="0">
<cstring>ThemeFocusColor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Themes</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">