summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKyle Kienapfel <Docteh@users.noreply.github.com>2022-06-01 09:59:58 +0200
committerKyle Kienapfel <Docteh@users.noreply.github.com>2022-06-02 02:22:53 +0200
commit054732210eee2f9ac8f3d026aa8e94ddc94590cf (patch)
tree9418de5c17c0f7aa8ec3305f3972b4a60cf0b657 /src
parentMerge pull request #8385 from lat9nq/just-subsys-win (diff)
downloadyuzu-054732210eee2f9ac8f3d026aa8e94ddc94590cf.tar
yuzu-054732210eee2f9ac8f3d026aa8e94ddc94590cf.tar.gz
yuzu-054732210eee2f9ac8f3d026aa8e94ddc94590cf.tar.bz2
yuzu-054732210eee2f9ac8f3d026aa8e94ddc94590cf.tar.lz
yuzu-054732210eee2f9ac8f3d026aa8e94ddc94590cf.tar.xz
yuzu-054732210eee2f9ac8f3d026aa8e94ddc94590cf.tar.zst
yuzu-054732210eee2f9ac8f3d026aa8e94ddc94590cf.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp15
-rw-r--r--src/yuzu/main.h1
2 files changed, 11 insertions, 5 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f4a9a7171..695015477 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -827,12 +827,11 @@ void GMainWindow::InitializeWidgets() {
// Setup Dock button
dock_status_button = new QPushButton();
- dock_status_button->setObjectName(QStringLiteral("TogglableStatusBarButton"));
+ dock_status_button->setObjectName(QStringLiteral("DockingStatusBarButton"));
dock_status_button->setFocusPolicy(Qt::NoFocus);
connect(dock_status_button, &QPushButton::clicked, this, &GMainWindow::OnToggleDockedMode);
- dock_status_button->setText(tr("DOCK"));
dock_status_button->setCheckable(true);
- dock_status_button->setChecked(Settings::values.use_docked_mode.GetValue());
+ UpdateDockedButton();
statusBar()->insertPermanentWidget(0, dock_status_button);
gpu_accuracy_button = new QPushButton();
@@ -2858,7 +2857,7 @@ void GMainWindow::OnToggleDockedMode() {
}
Settings::values.use_docked_mode.SetValue(!is_docked);
- dock_status_button->setChecked(!is_docked);
+ UpdateDockedButton();
OnDockedModeChanged(is_docked, !is_docked, *system);
}
@@ -3224,6 +3223,12 @@ void GMainWindow::UpdateGPUAccuracyButton() {
}
}
+void GMainWindow::UpdateDockedButton() {
+ const bool is_docked = Settings::values.use_docked_mode.GetValue();
+ dock_status_button->setChecked(is_docked);
+ dock_status_button->setText(is_docked ? tr("DOCKED") : tr("HANDHELD"));
+}
+
void GMainWindow::UpdateFilterText() {
const auto filter = Settings::values.scaling_filter.GetValue();
switch (filter) {
@@ -3267,10 +3272,10 @@ void GMainWindow::UpdateAAText() {
}
void GMainWindow::UpdateStatusButtons() {
- dock_status_button->setChecked(Settings::values.use_docked_mode.GetValue());
renderer_status_button->setChecked(Settings::values.renderer_backend.GetValue() ==
Settings::RendererBackend::Vulkan);
UpdateGPUAccuracyButton();
+ UpdateDockedButton();
UpdateFilterText();
UpdateAAText();
}
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index b399e9b01..600647015 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -320,6 +320,7 @@ private:
void MigrateConfigFiles();
void UpdateWindowTitle(std::string_view title_name = {}, std::string_view title_version = {},
std::string_view gpu_vendor = {});
+ void UpdateDockedButton();
void UpdateFilterText();
void UpdateAAText();
void UpdateStatusBar();