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.
This commit is contained in:
parent
a350ae6be6
commit
c94a8a3a43
3 changed files with 43 additions and 54 deletions
|
@ -87,7 +87,7 @@ void ConfigureGraphics::SetConfiguration() {
|
||||||
|
|
||||||
ui->bg_combobox->setCurrentIndex(Settings::values.bg_red.UsingGlobal() ? 0 : 1);
|
ui->bg_combobox->setCurrentIndex(Settings::values.bg_red.UsingGlobal() ? 0 : 1);
|
||||||
ui->bg_button->setEnabled(!Settings::values.bg_red.UsingGlobal());
|
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());
|
!Settings::values.aspect_ratio.UsingGlobal());
|
||||||
ConfigurationShared::SetHighlight(ui->bg_layout, "bg_layout",
|
ConfigurationShared::SetHighlight(ui->bg_layout, "bg_layout",
|
||||||
!Settings::values.bg_red.UsingGlobal());
|
!Settings::values.bg_red.UsingGlobal());
|
||||||
|
@ -263,8 +263,8 @@ void ConfigureGraphics::SetupPerGameUI() {
|
||||||
Settings::values.use_asynchronous_gpu_emulation,
|
Settings::values.use_asynchronous_gpu_emulation,
|
||||||
ConfigurationShared::trackers.use_asynchronous_gpu_emulation);
|
ConfigurationShared::trackers.use_asynchronous_gpu_emulation);
|
||||||
|
|
||||||
ConfigurationShared::SetColoredComboBox(ui->aspect_ratio_combobox, ui->aspect_ratio_layout,
|
ConfigurationShared::SetColoredComboBox(ui->aspect_ratio_combobox, ui->ar_label,
|
||||||
"aspect_ratio_layout",
|
"ar_label",
|
||||||
Settings::values.aspect_ratio.GetValue(true));
|
Settings::values.aspect_ratio.GetValue(true));
|
||||||
ConfigurationShared::InsertGlobalItem(
|
ConfigurationShared::InsertGlobalItem(
|
||||||
ui->api, static_cast<int>(Settings::values.renderer_backend.GetValue(true)));
|
ui->api, static_cast<int>(Settings::values.renderer_backend.GetValue(true)));
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>437</width>
|
||||||
<height>321</height>
|
<height>321</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="api_layout" native="true">
|
<widget class="QWidget" name="api_layout" native="true">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -37,8 +37,16 @@
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<property name="horizontalSpacing">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<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">
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="api">
|
<widget class="QComboBox" name="api">
|
||||||
<item>
|
<item>
|
||||||
|
@ -53,24 +61,15 @@
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="device_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Device:</string>
|
<string>Device:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="device"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -43,9 +43,9 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||||
ConfigurationShared::SetPerGameSetting(ui->gpu_accuracy, &Settings::values.gpu_accuracy);
|
ConfigurationShared::SetPerGameSetting(ui->gpu_accuracy, &Settings::values.gpu_accuracy);
|
||||||
ConfigurationShared::SetPerGameSetting(ui->anisotropic_filtering_combobox,
|
ConfigurationShared::SetPerGameSetting(ui->anisotropic_filtering_combobox,
|
||||||
&Settings::values.max_anisotropy);
|
&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());
|
!Settings::values.gpu_accuracy.UsingGlobal());
|
||||||
ConfigurationShared::SetHighlight(ui->af_layout, "af_layout",
|
ConfigurationShared::SetHighlight(ui->af_label, "af_label",
|
||||||
!Settings::values.max_anisotropy.UsingGlobal());
|
!Settings::values.max_anisotropy.UsingGlobal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,20 +156,10 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
|
||||||
ConfigurationShared::SetColoredTristate(ui->force_30fps_mode, "force_30fps_mode",
|
ConfigurationShared::SetColoredTristate(ui->force_30fps_mode, "force_30fps_mode",
|
||||||
Settings::values.force_30fps_mode,
|
Settings::values.force_30fps_mode,
|
||||||
ConfigurationShared::trackers.force_30fps_mode);
|
ConfigurationShared::trackers.force_30fps_mode);
|
||||||
ConfigurationShared::InsertGlobalItem(
|
ConfigurationShared::SetColoredComboBox(
|
||||||
ui->gpu_accuracy, static_cast<int>(Settings::values.gpu_accuracy.GetValue(true)));
|
ui->gpu_accuracy, ui->label_gpu_accuracy, "label_gpu_accuracy",
|
||||||
ConfigurationShared::InsertGlobalItem(
|
static_cast<int>(Settings::values.gpu_accuracy.GetValue(true)));
|
||||||
ui->anisotropic_filtering_combobox,
|
ConfigurationShared::SetColoredComboBox(
|
||||||
|
ui->anisotropic_filtering_combobox, ui->af_label, "af_label",
|
||||||
static_cast<int>(Settings::values.max_anisotropy.GetValue(true)));
|
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);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue