InterfacePane: Add BalloonTip to show active title checkbox

This commit is contained in:
Dentomologist 2023-11-12 00:29:52 -08:00 committed by Admiral H. Curtiss
parent c5532b19e6
commit 14f01bb12c
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
2 changed files with 8 additions and 6 deletions

View File

@ -187,7 +187,8 @@ void InterfacePane::CreateInGame()
new ConfigBool(tr("Use Panic Handlers"), Config::MAIN_USE_PANIC_HANDLERS); new ConfigBool(tr("Use Panic Handlers"), Config::MAIN_USE_PANIC_HANDLERS);
m_checkbox_enable_osd = m_checkbox_enable_osd =
new ConfigBool(tr("Show On-Screen Display Messages"), Config::MAIN_OSD_MESSAGES); new ConfigBool(tr("Show On-Screen Display Messages"), Config::MAIN_OSD_MESSAGES);
m_checkbox_show_active_title = new QCheckBox(tr("Show Active Title in Window Title")); m_checkbox_show_active_title =
new ConfigBool(tr("Show Active Title in Window Title"), Config::MAIN_SHOW_ACTIVE_TITLE);
m_checkbox_pause_on_focus_lost = new QCheckBox(tr("Pause on Focus Loss")); m_checkbox_pause_on_focus_lost = new QCheckBox(tr("Pause on Focus Loss"));
auto* mouse_groupbox = new QGroupBox(tr("Mouse Cursor Visibility")); auto* mouse_groupbox = new QGroupBox(tr("Mouse Cursor Visibility"));
@ -243,7 +244,6 @@ void InterfacePane::ConnectLayout()
[this]() { OnLanguageChanged(); }); [this]() { OnLanguageChanged(); });
connect(m_checkbox_top_window, &QCheckBox::toggled, &Settings::Instance(), connect(m_checkbox_top_window, &QCheckBox::toggled, &Settings::Instance(),
&Settings::KeepWindowOnTopChanged); &Settings::KeepWindowOnTopChanged);
connect(m_checkbox_show_active_title, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
connect(m_checkbox_pause_on_focus_lost, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_pause_on_focus_lost, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig);
connect(m_radio_cursor_visible_movement, &QRadioButton::toggled, this, connect(m_radio_cursor_visible_movement, &QRadioButton::toggled, this,
&InterfacePane::OnCursorVisibleMovement); &InterfacePane::OnCursorVisibleMovement);
@ -299,8 +299,6 @@ void InterfacePane::LoadConfig()
SignalBlocking(m_combobox_userstyle)->setCurrentIndex(index); SignalBlocking(m_combobox_userstyle)->setCurrentIndex(index);
// Render Window Options // Render Window Options
SignalBlocking(m_checkbox_show_active_title)
->setChecked(Config::Get(Config::MAIN_SHOW_ACTIVE_TITLE));
SignalBlocking(m_checkbox_pause_on_focus_lost) SignalBlocking(m_checkbox_pause_on_focus_lost)
->setChecked(Config::Get(Config::MAIN_PAUSE_ON_FOCUS_LOST)); ->setChecked(Config::Get(Config::MAIN_PAUSE_ON_FOCUS_LOST));
SignalBlocking(m_radio_cursor_visible_movement) SignalBlocking(m_radio_cursor_visible_movement)
@ -326,7 +324,6 @@ void InterfacePane::OnSaveConfig()
Settings::Instance().ApplyStyle(); Settings::Instance().ApplyStyle();
// Render Window Options // Render Window Options
Config::SetBase(Config::MAIN_SHOW_ACTIVE_TITLE, m_checkbox_show_active_title->isChecked());
Config::SetBase(Config::MAIN_PAUSE_ON_FOCUS_LOST, m_checkbox_pause_on_focus_lost->isChecked()); Config::SetBase(Config::MAIN_PAUSE_ON_FOCUS_LOST, m_checkbox_pause_on_focus_lost->isChecked());
Config::Save(); Config::Save();
@ -394,6 +391,9 @@ void InterfacePane::AddDescriptions()
QT_TR_NOOP("Shows on-screen display messages over the render window. These messages " QT_TR_NOOP("Shows on-screen display messages over the render window. These messages "
"disappear after several seconds." "disappear after several seconds."
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>"); "<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
static constexpr char TR_SHOW_ACTIVE_TITLE_DESCRIPTION[] =
QT_TR_NOOP("Shows the active game title in the render window's title bar."
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
m_checkbox_use_builtin_title_database->SetDescription(tr(TR_TITLE_DATABASE_DESCRIPTION)); m_checkbox_use_builtin_title_database->SetDescription(tr(TR_TITLE_DATABASE_DESCRIPTION));
@ -416,4 +416,6 @@ void InterfacePane::AddDescriptions()
m_checkbox_use_panic_handlers->SetDescription(tr(TR_USE_PANIC_HANDLERS_DESCRIPTION)); m_checkbox_use_panic_handlers->SetDescription(tr(TR_USE_PANIC_HANDLERS_DESCRIPTION));
m_checkbox_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION)); m_checkbox_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION));
m_checkbox_show_active_title->SetDescription(tr(TR_SHOW_ACTIVE_TITLE_DESCRIPTION));
} }

View File

@ -50,7 +50,7 @@ private:
ConfigBool* m_checkbox_confirm_on_stop; ConfigBool* m_checkbox_confirm_on_stop;
ConfigBool* m_checkbox_use_panic_handlers; ConfigBool* m_checkbox_use_panic_handlers;
ConfigBool* m_checkbox_enable_osd; ConfigBool* m_checkbox_enable_osd;
QCheckBox* m_checkbox_show_active_title; ConfigBool* m_checkbox_show_active_title;
QCheckBox* m_checkbox_pause_on_focus_lost; QCheckBox* m_checkbox_pause_on_focus_lost;
QRadioButton* m_radio_cursor_visible_movement; QRadioButton* m_radio_cursor_visible_movement;
QRadioButton* m_radio_cursor_visible_never; QRadioButton* m_radio_cursor_visible_never;