This commit is contained in:
Joshua Goins 2023-10-10 11:02:03 +03:00 committed by GitHub
commit 0544b587c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 33 deletions

View file

@ -3,6 +3,7 @@
#include <memory>
#include <thread>
#include <QScrollArea>
#include "common/settings.h"
#include "common/settings_enums.h"
@ -114,7 +115,13 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem,
for (std::size_t i = 0; i < player_tabs.size(); ++i) {
player_tabs[i]->setLayout(new QHBoxLayout(player_tabs[i]));
player_tabs[i]->layout()->addWidget(player_controllers[i]);
auto scroll_area = new QScrollArea(player_tabs[i]);
player_tabs[i]->layout()->addWidget(scroll_area);
scroll_area->setWidget(player_controllers[i]);
scroll_area->setWidgetResizable(true);
scroll_area->setFrameShape(QFrame::Shape::NoFrame);
connect(player_controllers[i], &ConfigureInputPlayer::Connected, [&, i](bool is_connected) {
// Ensures that the controllers are always connected in sequential order
if (is_connected) {

View file

@ -10,6 +10,18 @@
<height>487</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>743</height>
</size>
</property>
<property name="windowTitle">
<string>Configure Input</string>
</property>
@ -1327,22 +1339,28 @@
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="sliderZLThreshold">
<property name="maximumSize">
<size>
<width>70</width>
<height>15</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="sliderZLThreshold">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>20</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -1774,22 +1792,28 @@
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="sliderZRThreshold">
<property name="maximumSize">
<size>
<width>70</width>
<height>15</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="sliderZRThreshold">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>20</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>