diff options
author | lat9nq <lat9nq@virginia.edu> | 2020-07-14 05:25:14 +0200 |
---|---|---|
committer | lat9nq <lat9nq@virginia.edu> | 2020-07-19 19:26:55 +0200 |
commit | c94a8a3a439bd28c64e51753a5171fc4c3dc5903 (patch) | |
tree | 09d02d7ce29645a425e1fa24bdbb02583f5c6aec | |
parent | configure_system: Implement highlighted overrides (diff) | |
download | yuzu-c94a8a3a439bd28c64e51753a5171fc4c3dc5903.tar yuzu-c94a8a3a439bd28c64e51753a5171fc4c3dc5903.tar.gz yuzu-c94a8a3a439bd28c64e51753a5171fc4c3dc5903.tar.bz2 yuzu-c94a8a3a439bd28c64e51753a5171fc4c3dc5903.tar.lz yuzu-c94a8a3a439bd28c64e51753a5171fc4c3dc5903.tar.xz yuzu-c94a8a3a439bd28c64e51753a5171fc4c3dc5903.tar.zst yuzu-c94a8a3a439bd28c64e51753a5171fc4c3dc5903.zip |
-rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 6 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_graphics.ui | 67 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_graphics_advanced.cpp | 24 |
3 files changed, 43 insertions, 54 deletions
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<int>(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 @@ <rect> <x>0</x> <y>0</y> - <width>400</width> + <width>437</width> <height>321</height> </rect> </property> @@ -24,7 +24,7 @@ <layout class="QVBoxLayout" name="verticalLayout_3"> <item> <widget class="QWidget" name="api_layout" native="true"> - <layout class="QVBoxLayout" name="verticalLayout_5"> + <layout class="QGridLayout" name="gridLayout"> <property name="leftMargin"> <number>0</number> </property> @@ -37,40 +37,39 @@ <property name="bottomMargin"> <number>0</number> </property> - <item> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="1"> - <widget class="QComboBox" name="api"> - <item> - <property name="text"> - <string notr="true">OpenGL</string> - </property> - </item> - <item> - <property name="text"> - <string notr="true">Vulkan</string> - </property> - </item> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>API:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QComboBox" name="device"/> + <property name="horizontalSpacing"> + <number>6</number> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="api_label"> + <property name="text"> + <string>API:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="api"> + <item> + <property name="text"> + <string notr="true">OpenGL</string> + </property> </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Device:</string> - </property> - </widget> + <item> + <property name="text"> + <string notr="true">Vulkan</string> + </property> </item> - </layout> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="device_label"> + <property name="text"> + <string>Device:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QComboBox" name="device"/> </item> </layout> </widget> 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<int>(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<int>(Settings::values.gpu_accuracy.GetValue(true))); + ConfigurationShared::SetColoredComboBox( + ui->anisotropic_filtering_combobox, ui->af_label, "af_label", static_cast<int>(Settings::values.max_anisotropy.GetValue(true))); - - connect(ui->gpu_accuracy, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, - [this](int index) { - ConfigurationShared::SetHighlight(ui->gpu_accuracy_layout, "gpu_accuracy_layout", - index != 0); - }); - - connect(ui->anisotropic_filtering_combobox, - static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, [this](int index) { - ConfigurationShared::SetHighlight(ui->af_layout, "af_layout", index != 0); - }); } |