Skip to content

Commit

Permalink
Qt: Properly Grey Out Checkboxes When Perf OSD is Disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kamfretoz authored and F0bes committed Oct 26, 2024
1 parent ac32e6c commit c7b9ee9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 46 deletions.
2 changes: 2 additions & 0 deletions pcsx2-qt/Settings/GraphicsSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
92 changes: 46 additions & 46 deletions pcsx2-qt/Settings/GraphicsSettingsWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -1632,17 +1632,17 @@
</item>
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="osdOptionLayout">
<item row="6" column="1">
<widget class="QCheckBox" name="osdShowVideoCapture">
<item row="2" column="1">
<widget class="QCheckBox" name="osdShowSpeed">
<property name="text">
<string>Show Video Capture Status</string>
<string>Show Speed Percentages</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="osdShowGPU">
<item row="6" column="1">
<widget class="QCheckBox" name="osdShowVideoCapture">
<property name="text">
<string>Show GPU Usage</string>
<string>Show Video Capture Status</string>
</property>
</widget>
</item>
Expand All @@ -1653,94 +1653,94 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="osdShowInputs">
<item row="3" column="0">
<widget class="QCheckBox" name="osdShowIndicators">
<property name="text">
<string>Show Inputs</string>
<string>Show Indicators</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="osdShowSpeed">
<item row="0" column="1">
<widget class="QCheckBox" name="osdShowFPS">
<property name="text">
<string>Show Speed Percentages</string>
<string>Show FPS</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="osdShowHardwareInfo">
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowVPS">
<property name="text">
<string>Show Hardware Info</string>
<string>Show VPS</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="osdShowFrameTimes">
<item row="4" column="1">
<widget class="QCheckBox" name="osdShowInputs">
<property name="text">
<string>Show Frame Times</string>
<string>Show Inputs</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="osdShowSettings">
<item row="6" column="0">
<widget class="QCheckBox" name="osdShowHardwareInfo">
<property name="text">
<string>Show Settings</string>
<string>Show Hardware Info</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<item row="1" column="1">
<widget class="QCheckBox" name="osdShowGPU">
<property name="text">
<string>Warn About Unsafe Settings</string>
<string>Show GPU Usage</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="osdShowIndicators">
<item row="1" column="0">
<widget class="QCheckBox" name="osdShowCPU">
<property name="text">
<string>Show Indicators</string>
<string>Show CPU Usage</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="osdShowCPU">
<item row="3" column="1">
<widget class="QCheckBox" name="osdShowSettings">
<property name="text">
<string>Show CPU Usage</string>
<string>Show Settings</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="osdShowGSStats">
<item row="5" column="0">
<widget class="QCheckBox" name="osdShowFrameTimes">
<property name="text">
<string>Show Statistics</string>
<string>Show Frame Times</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="osdShowFPS">
<item row="2" column="0">
<widget class="QCheckBox" name="osdShowResolution">
<property name="text">
<string>Show FPS</string>
<string>Show Resolution</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="osdShowVersion">
<item row="4" column="0">
<widget class="QCheckBox" name="osdShowGSStats">
<property name="text">
<string>Show PCSX2 Version</string>
<string>Show Statistics</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="osdShowResolution">
<item row="8" column="0">
<widget class="QCheckBox" name="osdShowVersion">
<property name="text">
<string>Show Resolution</string>
<string>Show PCSX2 Version</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowVPS">
<item row="8" column="1">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<property name="text">
<string>Show VPS</string>
<string>Warn About Unsafe Settings</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit c7b9ee9

Please sign in to comment.