Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pcsx2-qt/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ void MainWindow::connectSignals()
connect(m_ui.actionViewStatusBar, &QAction::toggled, this, &MainWindow::onViewStatusBarActionToggled);
connect(m_ui.actionViewGameList, &QAction::triggered, this, &MainWindow::onViewGameListActionTriggered);
connect(m_ui.actionViewGameGrid, &QAction::triggered, this, &MainWindow::onViewGameGridActionTriggered);
connect(m_ui.actionViewFullscreenGUI, &QAction::triggered, this, &MainWindow::onViewFullscreenGUIActionTriggered);
connect(m_ui.actionViewSystemDisplay, &QAction::triggered, this, &MainWindow::onViewSystemDisplayTriggered);
connect(m_ui.actionViewGameProperties, &QAction::triggered, this, &MainWindow::onViewGamePropertiesActionTriggered);
connect(m_ui.actionGitHubRepository, &QAction::triggered, this, &MainWindow::onGitHubRepositoryActionTriggered);
Expand Down Expand Up @@ -934,7 +935,10 @@ void MainWindow::restoreStateFromConfig()
{
const bool fullscreen = Host::GetBaseBoolSettingValue("UI", "MainWindowFullscreen");
if (fullscreen)
{
m_ui.actionViewFullscreenGUI->setChecked(true);
showFullScreen();
}
}
}
}
Expand Down Expand Up @@ -1768,6 +1772,11 @@ void MainWindow::onViewLockToolbarActionToggled(bool checked)
m_ui.toolBar->setMovable(!checked);
}

void MainWindow::onViewFullscreenGUIActionTriggered(bool checked) {
Host::SetBaseBoolSettingValue("UI", "MainWindowFullscreen", checked);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can call Host::CommitBaseSettingChanges(); here to save the setting.

Also use git-clang-format (or just regular clang-format if there aren't too many unrelated changes) to format your changes.

checked ? showFullScreen() : showNormal();
}

void MainWindow::onViewStatusBarActionToggled(bool checked)
{
Host::SetBaseBoolSettingValue("UI", "ShowStatusBar", checked);
Expand Down
1 change: 1 addition & 0 deletions pcsx2-qt/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ private Q_SLOTS:
void onViewToolbarActionToggled(bool checked);
void onViewLockToolbarActionToggled(bool checked);
void onViewStatusBarActionToggled(bool checked);
void onViewFullscreenGUIActionTriggered(bool checked);
void onViewGameListActionTriggered();
void onViewGameGridActionTriggered();
void onViewSystemDisplayTriggered();
Expand Down
12 changes: 12 additions & 0 deletions pcsx2-qt/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<addaction name="actionViewLockToolbar"/>
<addaction name="actionViewStatusBar"/>
<addaction name="actionViewStatusBarVerbose"/>
<addaction name="actionViewFullscreenGUI"/>
<addaction name="separator"/>
<addaction name="actionViewGameList"/>
<addaction name="actionViewGameGrid"/>
Expand Down Expand Up @@ -1075,6 +1076,17 @@
<string>Edit &amp;Patches...</string>
</property>
</action>
<action name="actionViewFullscreenGUI">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Fullscreen (GUI)</string>
</property>
<property name="toolTip">
<string>Make the PCSX2 GUI Fullscreen</string>
</property>
</action>
</widget>
<resources>
<include location="resources/resources.qrc"/>
Expand Down
Loading