From c94a8a3a439bd28c64e51753a5171fc4c3dc5903 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 23:25:14 -0400 Subject: configure_per_game: Improve style consistency The way the configurations are set up, it is not trivial to do this. I'll leave it as is, but the API selection, and the background color and volume slider selectors are kind of not following the style. --- src/yuzu/configuration/configure_graphics.cpp | 6 +- src/yuzu/configuration/configure_graphics.ui | 67 +++++++++++----------- .../configuration/configure_graphics_advanced.cpp | 24 +++----- 3 files changed, 43 insertions(+), 54 deletions(-) (limited to 'src') diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index c79b256f9..74ee8adfb 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -87,7 +87,7 @@ void ConfigureGraphics::SetConfiguration() { ui->bg_combobox->setCurrentIndex(Settings::values.bg_red.UsingGlobal() ? 0 : 1); ui->bg_button->setEnabled(!Settings::values.bg_red.UsingGlobal()); - ConfigurationShared::SetHighlight(ui->aspect_ratio_layout, "aspect_ratio_layout", + ConfigurationShared::SetHighlight(ui->ar_label, "ar_label", !Settings::values.aspect_ratio.UsingGlobal()); ConfigurationShared::SetHighlight(ui->bg_layout, "bg_layout", !Settings::values.bg_red.UsingGlobal()); @@ -263,8 +263,8 @@ void ConfigureGraphics::SetupPerGameUI() { Settings::values.use_asynchronous_gpu_emulation, ConfigurationShared::trackers.use_asynchronous_gpu_emulation); - ConfigurationShared::SetColoredComboBox(ui->aspect_ratio_combobox, ui->aspect_ratio_layout, - "aspect_ratio_layout", + ConfigurationShared::SetColoredComboBox(ui->aspect_ratio_combobox, ui->ar_label, + "ar_label", Settings::values.aspect_ratio.GetValue(true)); ConfigurationShared::InsertGlobalItem( ui->api, static_cast(Settings::values.renderer_backend.GetValue(true))); diff --git a/src/yuzu/configuration/configure_graphics.ui b/src/yuzu/configuration/configure_graphics.ui index 6164569fe..e3bbf2f59 100644 --- a/src/yuzu/configuration/configure_graphics.ui +++ b/src/yuzu/configuration/configure_graphics.ui @@ -6,7 +6,7 @@ 0 0 - 400 + 437 321 @@ -24,7 +24,7 @@ - + 0 @@ -37,40 +37,39 @@ 0 - - - - - - - OpenGL - - - - - Vulkan - - - - - - - - API: - - - - - + + 6 + + + + + API: + + + + + + + + OpenGL + - - - - Device: - - + + + Vulkan + - + + + + + + Device: + + + + + diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index 1d9a1076e..d02e6c798 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp @@ -43,9 +43,9 @@ void ConfigureGraphicsAdvanced::SetConfiguration() { ConfigurationShared::SetPerGameSetting(ui->gpu_accuracy, &Settings::values.gpu_accuracy); ConfigurationShared::SetPerGameSetting(ui->anisotropic_filtering_combobox, &Settings::values.max_anisotropy); - ConfigurationShared::SetHighlight(ui->gpu_accuracy_layout, "gpu_accuracy_layout", + ConfigurationShared::SetHighlight(ui->label_gpu_accuracy, "label_gpu_accuracy", !Settings::values.gpu_accuracy.UsingGlobal()); - ConfigurationShared::SetHighlight(ui->af_layout, "af_layout", + ConfigurationShared::SetHighlight(ui->af_label, "af_label", !Settings::values.max_anisotropy.UsingGlobal()); } } @@ -156,20 +156,10 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() { ConfigurationShared::SetColoredTristate(ui->force_30fps_mode, "force_30fps_mode", Settings::values.force_30fps_mode, ConfigurationShared::trackers.force_30fps_mode); - ConfigurationShared::InsertGlobalItem( - ui->gpu_accuracy, static_cast(Settings::values.gpu_accuracy.GetValue(true))); - ConfigurationShared::InsertGlobalItem( - ui->anisotropic_filtering_combobox, + ConfigurationShared::SetColoredComboBox( + ui->gpu_accuracy, ui->label_gpu_accuracy, "label_gpu_accuracy", + static_cast(Settings::values.gpu_accuracy.GetValue(true))); + ConfigurationShared::SetColoredComboBox( + ui->anisotropic_filtering_combobox, ui->af_label, "af_label", static_cast(Settings::values.max_anisotropy.GetValue(true))); - - connect(ui->gpu_accuracy, static_cast(&QComboBox::activated), this, - [this](int index) { - ConfigurationShared::SetHighlight(ui->gpu_accuracy_layout, "gpu_accuracy_layout", - index != 0); - }); - - connect(ui->anisotropic_filtering_combobox, - static_cast(&QComboBox::activated), this, [this](int index) { - ConfigurationShared::SetHighlight(ui->af_layout, "af_layout", index != 0); - }); } -- cgit v1.2.3