From bc3cc01cc986b4b7d56c7d25898ed572e75c36a9 Mon Sep 17 00:00:00 2001 From: master0fdisaster <38867833+master0fdisaster@users.noreply.github.com> Date: Thu, 9 Aug 2018 15:20:46 +0200 Subject: [PATCH 1/3] Qt: Config/Interface: Fix User Style Drop Down makes the user style drop down load the right custom style after a restart --- Source/Core/DolphinQt/Settings/InterfacePane.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index ad6f66e842..92efac4a3c 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -218,11 +219,10 @@ void InterfacePane::LoadConfig() m_combobox_theme->findText(QString::fromStdString(SConfig::GetInstance().theme_name))); const QString userstyle = Settings::Instance().GetCurrentUserStyle(); + const int index = m_combobox_userstyle->findText(QFileInfo(userstyle).baseName()); - if (userstyle.isEmpty()) - m_combobox_userstyle->setCurrentIndex(0); - else - m_combobox_userstyle->setCurrentText(userstyle); + if (index > 0) + m_combobox_userstyle->setCurrentIndex(index); m_checkbox_use_userstyle->setChecked(Settings::Instance().AreUserStylesEnabled()); @@ -247,8 +247,8 @@ void InterfacePane::OnSaveConfig() Settings::Instance().SetKeepWindowOnTop(m_checkbox_top_window->isChecked()); settings.m_use_builtin_title_database = m_checkbox_use_builtin_title_database->isChecked(); Settings::Instance().SetDebugModeEnabled(m_checkbox_show_debugging_ui->isChecked()); - Settings::Instance().SetCurrentUserStyle(m_combobox_userstyle->currentData().toString()); Settings::Instance().SetUserStylesEnabled(m_checkbox_use_userstyle->isChecked()); + Settings::Instance().SetCurrentUserStyle(m_combobox_userstyle->currentData().toString()); const bool visible = m_checkbox_use_userstyle->isChecked(); From 1544d7d681b5dc1dcdbea60cf09fdb4fbafcf371 Mon Sep 17 00:00:00 2001 From: master0fdisaster <38867833+master0fdisaster@users.noreply.github.com> Date: Thu, 9 Aug 2018 15:22:52 +0200 Subject: [PATCH 2/3] Qt: Config/Interface: Fix "Show Active title in Window Title" Checkbox Makes the checkbox save when it's toggled. --- Source/Core/DolphinQt/Settings/InterfacePane.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index 92efac4a3c..aafe1e56bf 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -200,6 +200,7 @@ void InterfacePane::ConnectLayout() &InterfacePane::OnSaveConfig); connect(m_checkbox_confirm_on_stop, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_use_panic_handlers, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); + connect(m_checkbox_show_active_title, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_enable_osd, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_pause_on_focus_lost, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_hide_mouse, &QCheckBox::toggled, &Settings::Instance(), From 0d79e8a2ca18b2177c2cb853a32279e532089775 Mon Sep 17 00:00:00 2001 From: master0fdisaster <38867833+master0fdisaster@users.noreply.github.com> Date: Fri, 10 Aug 2018 02:22:11 +0200 Subject: [PATCH 3/3] Qt: Config/Advanced: Fix CPU Clock Speed Slider Changes rounding from ceiling to nearest, when updating the slider value. Using ceiling as rounding made some values inaccessible. --- Source/Core/DolphinQt/Settings/AdvancedPane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/Settings/AdvancedPane.cpp b/Source/Core/DolphinQt/Settings/AdvancedPane.cpp index 3e70e385d7..1e9ceeec87 100644 --- a/Source/Core/DolphinQt/Settings/AdvancedPane.cpp +++ b/Source/Core/DolphinQt/Settings/AdvancedPane.cpp @@ -139,7 +139,7 @@ void AdvancedPane::Update() m_cpu_clock_override_slider_label->setEnabled(enable_cpu_clock_override_widgets); m_cpu_clock_override_slider->setValue( - static_cast(std::ceil(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f))); + static_cast(std::round(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f))); m_cpu_clock_override_slider_label->setText([] { int core_clock = SystemTimers::GetTicksPerSecond() / std::pow(10, 6);