mirror of
https://github.com/tnodir/fort
synced 2024-11-15 04:05:50 +00:00
UI: Options: Fix "Theme" selected value
This commit is contained in:
parent
8a1b710ea0
commit
80929e6d4a
@ -142,9 +142,10 @@ void IfacePage::retranslateComboTheme()
|
||||
// Sync with Qt::ColorScheme
|
||||
const QStringList list = { tr("System"), tr("Light"), tr("Dark") };
|
||||
|
||||
const int currentIndex = qMax(m_comboTheme->currentIndex(), 0);
|
||||
ControlUtil::setComboBoxTexts(m_comboTheme, list);
|
||||
|
||||
ControlUtil::setComboBoxTexts(m_comboTheme, list, currentIndex);
|
||||
const auto colorScheme = IniUser::colorSchemeByName(iniUser()->theme());
|
||||
m_comboTheme->setCurrentIndex(colorScheme);
|
||||
}
|
||||
|
||||
void IfacePage::retranslateComboHotKey()
|
||||
@ -336,9 +337,6 @@ QLayout *IfacePage::setupThemeLayout()
|
||||
});
|
||||
m_comboTheme->setFixedWidth(200);
|
||||
|
||||
const auto colorScheme = IniUser::colorSchemeByName(iniUser()->theme());
|
||||
m_comboTheme->setCurrentIndex(colorScheme);
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||
m_comboTheme->setEnabled(false);
|
||||
#endif
|
||||
|
@ -74,6 +74,7 @@ private:
|
||||
QComboBox *m_comboLanguage = nullptr;
|
||||
QLabel *m_labelTheme = nullptr;
|
||||
QComboBox *m_comboTheme = nullptr;
|
||||
|
||||
QCheckBox *m_cbHotKeysEnabled = nullptr;
|
||||
QCheckBox *m_cbHotKeysGlobal = nullptr;
|
||||
QLabel *m_labelHotKey = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user