Make player input configuration scrollable

Use height of 800 for main widget minimumSize
ZL/RL slider threshold 18 -> 20 max height
This commit is contained in:
Behunin 2022-12-17 14:29:12 -07:00
commit c6d7dfaee7
3 changed files with 2998 additions and 3004 deletions

View file

@ -291,7 +291,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
InputCommon::InputSubsystem* input_subsystem_, InputCommon::InputSubsystem* input_subsystem_,
InputProfiles* profiles_, Core::HID::HIDCore& hid_core_, InputProfiles* profiles_, Core::HID::HIDCore& hid_core_,
bool is_powered_on_, bool debug_) bool is_powered_on_, bool debug_)
: QWidget(parent), : QScrollArea(parent),
ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index{player_index_}, debug{debug_}, ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index{player_index_}, debug{debug_},
is_powered_on{is_powered_on_}, input_subsystem{input_subsystem_}, profiles(profiles_), is_powered_on{is_powered_on_}, input_subsystem{input_subsystem_}, profiles(profiles_),
timeout_timer(std::make_unique<QTimer>()), timeout_timer(std::make_unique<QTimer>()),

View file

@ -10,7 +10,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <QWidget> #include <QScrollArea>
#include "common/param_package.h" #include "common/param_package.h"
#include "common/settings.h" #include "common/settings.h"
@ -46,7 +46,7 @@ class EmulatedController;
enum class NpadStyleIndex : u8; enum class NpadStyleIndex : u8;
} // namespace Core::HID } // namespace Core::HID
class ConfigureInputPlayer : public QWidget { class ConfigureInputPlayer : public QScrollArea {
Q_OBJECT Q_OBJECT
public: public:

View file

@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>ConfigureInputPlayer</class> <class>ConfigureInputPlayer</class>
<widget class="QWidget" name="ConfigureInputPlayer"> <widget class="QScrollArea" name="ConfigureInputPlayer">
<property name="geometry"> <widget class="QWidget">
<rect> <property name="minimumSize">
<x>0</x> <size>
<y>0</y>
<width>780</width> <width>780</width>
<height>487</height> <height>800</height>
</rect> </size>
</property>
<property name="windowTitle">
<string>Configure Input</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">
@ -154,11 +150,8 @@
</property> </property>
<item> <item>
<widget class="QComboBox" name="comboProfiles"> <widget class="QComboBox" name="comboProfiles">
<property name="minimumSize"> <property name="minimumContentsLength">
<size> <number>20</number>
<width>0</width>
<height>21</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -1332,7 +1325,7 @@
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>70</width> <width>70</width>
<height>15</height> <height>20</height>
</size> </size>
</property> </property>
<property name="maximum"> <property name="maximum">
@ -1779,7 +1772,7 @@
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>70</width> <width>70</width>
<height>15</height> <height>20</height>
</size> </size>
</property> </property>
<property name="maximum"> <property name="maximum">
@ -3074,6 +3067,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>PlayerControlPreview</class> <class>PlayerControlPreview</class>