Qt: Properly Grey Out Checkboxes When Perf OSD is Disabled

This commit is contained in:
KamFretoZ 2024-10-26 19:37:40 +07:00 committed by Ty
parent ac32e6ca92
commit c7b9ee92b7
2 changed files with 72 additions and 70 deletions

View File

@ -931,12 +931,14 @@ void GraphicsSettingsWidget::onPerformancePosChanged()
{
const bool enabled = m_ui.osdPerformancePos->currentIndex() != (m_dialog->isPerGameSettings() ? 1 : 0);
m_ui.osdShowVPS->setEnabled(enabled);
m_ui.osdShowSpeed->setEnabled(enabled);
m_ui.osdShowFPS->setEnabled(enabled);
m_ui.osdShowCPU->setEnabled(enabled);
m_ui.osdShowGPU->setEnabled(enabled);
m_ui.osdShowResolution->setEnabled(enabled);
m_ui.osdShowGSStats->setEnabled(enabled);
m_ui.osdShowHardwareInfo->setEnabled(enabled);
m_ui.osdShowIndicators->setEnabled(enabled);
m_ui.osdShowFrameTimes->setEnabled(enabled);
m_ui.osdShowVersion->setEnabled(enabled);

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>720</width>
<height>562</height>
<height>594</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@ -1632,6 +1632,13 @@
</item>
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="osdOptionLayout">
<item row="2" column="1">
<widget class="QCheckBox" name="osdShowSpeed">
<property name="text">
<string>Show Speed Percentages</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="osdShowVideoCapture">
<property name="text">
@ -1639,13 +1646,6 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="osdShowGPU">
<property name="text">
<string>Show GPU Usage</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="osdShowInputRec">
<property name="text">
@ -1653,48 +1653,6 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="osdShowInputs">
<property name="text">
<string>Show Inputs</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="osdShowSpeed">
<property name="text">
<string>Show Speed Percentages</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="osdShowHardwareInfo">
<property name="text">
<string>Show Hardware Info</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="osdShowFrameTimes">
<property name="text">
<string>Show Frame Times</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="osdShowSettings">
<property name="text">
<string>Show Settings</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<property name="text">
<string>Warn About Unsafe Settings</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="osdShowIndicators">
<property name="text">
@ -1702,20 +1660,6 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="osdShowCPU">
<property name="text">
<string>Show CPU Usage</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="osdShowGSStats">
<property name="text">
<string>Show Statistics</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="osdShowFPS">
<property name="text">
@ -1723,10 +1667,52 @@
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="osdShowVersion">
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowVPS">
<property name="text">
<string>Show PCSX2 Version</string>
<string>Show VPS</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="osdShowInputs">
<property name="text">
<string>Show Inputs</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="osdShowHardwareInfo">
<property name="text">
<string>Show Hardware Info</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="osdShowGPU">
<property name="text">
<string>Show GPU Usage</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="osdShowCPU">
<property name="text">
<string>Show CPU Usage</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="osdShowSettings">
<property name="text">
<string>Show Settings</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="osdShowFrameTimes">
<property name="text">
<string>Show Frame Times</string>
</property>
</widget>
</item>
@ -1737,10 +1723,24 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowVPS">
<item row="4" column="0">
<widget class="QCheckBox" name="osdShowGSStats">
<property name="text">
<string>Show VPS</string>
<string>Show Statistics</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="osdShowVersion">
<property name="text">
<string>Show PCSX2 Version</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<property name="text">
<string>Warn About Unsafe Settings</string>
</property>
</widget>
</item>