From dc15a555c92b09269d2b3602f868780309c9b4c9 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sat, 11 Nov 2023 23:41:39 -0800 Subject: [PATCH] InterfacePane: Add BalloonTip to confirm on stop checkbox --- Source/Core/DolphinQt/Settings/InterfacePane.cpp | 10 ++++++---- Source/Core/DolphinQt/Settings/InterfacePane.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index 8f522a50fe..554d55d386 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -182,7 +182,7 @@ void InterfacePane::CreateInGame() m_main_layout->addWidget(groupbox); m_checkbox_top_window = new ConfigBool(tr("Keep Window on Top"), Config::MAIN_KEEP_WINDOW_ON_TOP); - m_checkbox_confirm_on_stop = new QCheckBox(tr("Confirm on Stop")); + m_checkbox_confirm_on_stop = new ConfigBool(tr("Confirm on Stop"), Config::MAIN_CONFIRM_ON_STOP); m_checkbox_use_panic_handlers = new QCheckBox(tr("Use Panic Handlers")); m_checkbox_enable_osd = new QCheckBox(tr("Show On-Screen Display Messages")); m_checkbox_show_active_title = new QCheckBox(tr("Show Active Title in Window Title")); @@ -241,7 +241,6 @@ void InterfacePane::ConnectLayout() [this]() { OnLanguageChanged(); }); connect(m_checkbox_top_window, &QCheckBox::toggled, &Settings::Instance(), &Settings::KeepWindowOnTopChanged); - 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); @@ -300,7 +299,6 @@ void InterfacePane::LoadConfig() SignalBlocking(m_combobox_userstyle)->setCurrentIndex(index); // Render Window Options - SignalBlocking(m_checkbox_confirm_on_stop)->setChecked(Config::Get(Config::MAIN_CONFIRM_ON_STOP)); SignalBlocking(m_checkbox_use_panic_handlers) ->setChecked(Config::Get(Config::MAIN_USE_PANIC_HANDLERS)); SignalBlocking(m_checkbox_enable_osd)->setChecked(Config::Get(Config::MAIN_OSD_MESSAGES)); @@ -331,7 +329,6 @@ void InterfacePane::OnSaveConfig() Settings::Instance().ApplyStyle(); // Render Window Options - Config::SetBase(Config::MAIN_CONFIRM_ON_STOP, m_checkbox_confirm_on_stop->isChecked()); Config::SetBase(Config::MAIN_USE_PANIC_HANDLERS, m_checkbox_use_panic_handlers->isChecked()); Config::SetBase(Config::MAIN_OSD_MESSAGES, m_checkbox_enable_osd->isChecked()); Config::SetBase(Config::MAIN_SHOW_ACTIVE_TITLE, m_checkbox_show_active_title->isChecked()); @@ -390,6 +387,9 @@ void InterfacePane::AddDescriptions() static constexpr char TR_DISABLE_SCREENSAVER_DESCRIPTION[] = QT_TR_NOOP("Disables your screensaver while running a game." "

If unsure, leave this checked."); + static constexpr char TR_CONFIRM_ON_STOP_DESCRIPTION[] = + QT_TR_NOOP("Prompts you to confirm that you want to end emulation when you press Stop." + "

If unsure, leave this checked."); m_checkbox_use_builtin_title_database->SetDescription(tr(TR_TITLE_DATABASE_DESCRIPTION)); @@ -406,4 +406,6 @@ void InterfacePane::AddDescriptions() m_checkbox_use_covers->SetDescription(tr(TR_USE_COVERS_DESCRIPTION)); m_checkbox_disable_screensaver->SetDescription(tr(TR_DISABLE_SCREENSAVER_DESCRIPTION)); + + m_checkbox_confirm_on_stop->SetDescription(tr(TR_CONFIRM_ON_STOP_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.h b/Source/Core/DolphinQt/Settings/InterfacePane.h index 29e56ae049..761dae880a 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.h +++ b/Source/Core/DolphinQt/Settings/InterfacePane.h @@ -47,7 +47,7 @@ private: ConfigBool* m_checkbox_use_covers; ConfigBool* m_checkbox_disable_screensaver; - QCheckBox* m_checkbox_confirm_on_stop; + ConfigBool* m_checkbox_confirm_on_stop; QCheckBox* m_checkbox_use_panic_handlers; QCheckBox* m_checkbox_enable_osd; QCheckBox* m_checkbox_show_active_title;