When theme color change we set the stylesheet.

This commit is contained in:
Paddle
2023-08-14 08:44:14 +02:00
parent 71d06363c6
commit 8cea75434b
2 changed files with 8 additions and 0 deletions

View File

@@ -47,6 +47,9 @@ DlgSettingsTheme::DlgSettingsTheme(QWidget* parent)
ui->setupUi(this);
connect(ui->styleSheetsCombobox, qOverload<int>(&QComboBox::activated), this, &DlgSettingsTheme::onStyleSheetChanged);
connect(ui->ThemeAccentColor1, &Gui::PrefColorButton::changed, this, &DlgSettingsTheme::onColorChanged);
connect(ui->ThemeAccentColor2, &Gui::PrefColorButton::changed, this, &DlgSettingsTheme::onColorChanged);
connect(ui->ThemeAccentColor3, &Gui::PrefColorButton::changed, this, &DlgSettingsTheme::onColorChanged);
}
/**
@@ -147,6 +150,10 @@ void DlgSettingsTheme::onStyleSheetChanged(int index) {
styleSheetChanged = true;
}
void DlgSettingsTheme::onColorChanged() {
styleSheetChanged = true;
}
/**
* Sets the strings of the subwidgets using the current language.
*/

View File

@@ -54,6 +54,7 @@ protected:
protected Q_SLOTS:
void onStyleSheetChanged(int index);
void onColorChanged();
private:
std::unique_ptr<Ui_DlgSettingsTheme> ui;