Qt: Fix overlapping group boxes in controller global settings (#3683)

This commit is contained in:
Davide Pesavento
2026-01-16 02:23:44 -05:00
committed by GitHub
parent a9bea9a4dd
commit ff889fc749
2 changed files with 30 additions and 36 deletions

View File

@@ -28,10 +28,10 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
SettingsInterface* sif = dialog->getEditingSettingsInterface();
// editing game profile or input profile
bool remove_sources = false;
if (sif)
{
// Editing game profile or input profile.
m_ui.useProfileHotkeyBindings->setChecked(sif->GetBoolValue("ControllerPorts", "UseProfileHotkeyBindings", false));
connect(m_ui.useProfileHotkeyBindings, &QCheckBox::checkStateChanged, this, [this](int new_state) {
m_dialog->setBoolValue("ControllerPorts", "UseProfileHotkeyBindings", (new_state == Qt::Checked));
@@ -46,7 +46,7 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
}
else
{
// remove profile options from the UI.
// Editing base settings, remove profile options from the UI.
m_ui.mainLayout->removeWidget(m_ui.profileSettings);
QtUtils::SafeDeleteWidget(m_ui.profileSettings);
m_ui.profileSettingsLayout = nullptr;

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>977</width>
<height>743</height>
<width>900</width>
<height>658</height>
</rect>
</property>
<layout class="QGridLayout" name="mainLayout" columnstretch="1,0">
@@ -108,6 +108,31 @@
</layout>
</widget>
</item>
<item row="0" column="1" rowspan="7">
<widget class="QGroupBox" name="deviceListGroup">
<property name="title">
<string>Detected Devices</string>
</property>
<layout class="QGridLayout" name="deviceListLayout">
<item row="0" column="0" colspan="2">
<widget class="QListView" name="deviceList">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="xinputGroup">
<property name="title">
@@ -342,7 +367,7 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<item row="5" column="0">
<widget class="QGroupBox" name="profileSettings">
<property name="title">
<string>Profile Settings</string>
@@ -380,39 +405,8 @@
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" rowspan="7">
<widget class="QGroupBox" name="deviceListGroup">
<property name="title">
<string>Detected Devices</string>
</property>
<layout class="QGridLayout" name="deviceListLayout">
<item row="0" column="0" colspan="2">
<widget class="QListView" name="deviceList">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>