mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 14:19:02 +00:00
DolphinQt/Settings: Split setting of the user style into two functions.
This makes it so that if you just want to reload the current style (eg. on program start, or in response to a system event), you don't need to know the name of the currently selected user style. It's also more consistent with the way the 'userstyle/enabled' flag works.
This commit is contained in:
parent
9d08c8a45d
commit
6d585b6eb6
6 changed files with 20 additions and 14 deletions
|
@ -254,7 +254,7 @@ void InterfacePane::LoadConfig()
|
|||
->setCurrentIndex(
|
||||
m_combobox_theme->findText(QString::fromStdString(Config::Get(Config::MAIN_THEME_NAME))));
|
||||
|
||||
const QString userstyle = Settings::Instance().GetCurrentUserStyle();
|
||||
const QString userstyle = Settings::Instance().GetUserStyleName();
|
||||
const int index = m_combobox_userstyle->findData(QFileInfo(userstyle).fileName());
|
||||
|
||||
if (index > 0)
|
||||
|
@ -298,7 +298,8 @@ void InterfacePane::OnSaveConfig()
|
|||
m_checkbox_use_builtin_title_database->isChecked());
|
||||
Settings::Instance().SetDebugModeEnabled(m_checkbox_show_debugging_ui->isChecked());
|
||||
Settings::Instance().SetUserStylesEnabled(m_checkbox_use_userstyle->isChecked());
|
||||
Settings::Instance().SetCurrentUserStyle(m_combobox_userstyle->currentData().toString());
|
||||
Settings::Instance().SetUserStyleName(m_combobox_userstyle->currentData().toString());
|
||||
Settings::Instance().ApplyStyle();
|
||||
|
||||
const bool visible = m_checkbox_use_userstyle->isChecked();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue