mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 22:38:39 -05:00
ui: Status bars dock button becomes dock/undock button
For people not used to the Yuzu UI it's not always clear if the emulated console is docked or not. The other items update their text when clicked, this PR brings the DOCK button in line with this. DOCK -> DOCKED or HANDHELD
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user