mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Qt: make dockwidget title bars optional
This commit is contained in:
parent
0236b994e4
commit
1b2e512179
6 changed files with 68 additions and 11 deletions
|
|
@ -1145,6 +1145,13 @@ void main_window::RepaintGui()
|
|||
Q_EMIT RequestTrophyManagerRepaint();
|
||||
}
|
||||
|
||||
void main_window::ShowTitleBars(bool show)
|
||||
{
|
||||
m_gameListFrame->SetTitleBarVisible(show);
|
||||
m_debuggerFrame->SetTitleBarVisible(show);
|
||||
m_logFrame->SetTitleBarVisible(show);
|
||||
}
|
||||
|
||||
void main_window::CreateActions()
|
||||
{
|
||||
ui->exitAct->setShortcuts(QKeySequence::Quit);
|
||||
|
|
@ -1371,6 +1378,12 @@ void main_window::CreateConnects()
|
|||
guiSettings->SetValue(gui::mw_gamelist, checked);
|
||||
});
|
||||
|
||||
connect(ui->showTitleBarsAct, &QAction::triggered, [=](bool checked)
|
||||
{
|
||||
ShowTitleBars(checked);
|
||||
guiSettings->SetValue(gui::mw_titleBarsVisible, checked);
|
||||
});
|
||||
|
||||
connect(ui->showToolBarAct, &QAction::triggered, [=](bool checked)
|
||||
{
|
||||
ui->toolBar->setVisible(checked);
|
||||
|
|
@ -1606,12 +1619,15 @@ void main_window::ConfigureGuiFromSettings(bool configure_all)
|
|||
ui->showGameListAct->setChecked(guiSettings->GetValue(gui::mw_gamelist).toBool());
|
||||
ui->showDebuggerAct->setChecked(guiSettings->GetValue(gui::mw_debugger).toBool());
|
||||
ui->showToolBarAct->setChecked(guiSettings->GetValue(gui::mw_toolBarVisible).toBool());
|
||||
ui->showTitleBarsAct->setChecked(guiSettings->GetValue(gui::mw_titleBarsVisible).toBool());
|
||||
|
||||
m_debuggerFrame->setVisible(ui->showDebuggerAct->isChecked());
|
||||
m_logFrame->setVisible(ui->showLogAct->isChecked());
|
||||
m_gameListFrame->setVisible(ui->showGameListAct->isChecked());
|
||||
ui->toolBar->setVisible(ui->showToolBarAct->isChecked());
|
||||
|
||||
ShowTitleBars(ui->showTitleBarsAct->isChecked());
|
||||
|
||||
ui->showHiddenEntriesAct->setChecked(guiSettings->GetValue(gui::gl_show_hidden).toBool());
|
||||
m_gameListFrame->SetShowHidden(ui->showHiddenEntriesAct->isChecked()); // prevent GetValue in m_gameListFrame->LoadSettings
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue