From b08ec7dcf67c1e99695581c5555a8829368956f6 Mon Sep 17 00:00:00 2001 From: Alexander Babikov <2708460+lemondrops@users.noreply.github.com> Date: Thu, 24 Aug 2023 20:45:36 +0500 Subject: [PATCH] qt: Expand the number of items displayed in comboboxes to 30 --- src/qt/qt_deviceconfig.cpp | 5 +++ src/qt/qt_harddiskdialog.ui | 36 ++++++++++++++--- src/qt/qt_joystickconfiguration.cpp | 3 ++ src/qt/qt_joystickconfiguration.ui | 6 ++- src/qt/qt_newfloppydialog.ui | 6 +++ src/qt/qt_progsettings.ui | 6 +++ src/qt/qt_settingsdisplay.ui | 6 +++ src/qt/qt_settingsfloppycdrom.ui | 30 ++++++++++++--- src/qt/qt_settingsharddisks.ui | 18 +++++++-- src/qt/qt_settingsinput.ui | 9 ++++- src/qt/qt_settingsmachine.ui | 30 +++++++++++++-- src/qt/qt_settingsnetwork.ui | 36 +++++++++++++++++ src/qt/qt_settingsotherperipherals.ui | 42 ++++++++++++++++++-- src/qt/qt_settingsotherremovable.ui | 30 ++++++++++++--- src/qt/qt_settingsports.ui | 24 ++++++++++-- src/qt/qt_settingssound.ui | 18 +++++++++ src/qt/qt_settingsstoragecontrollers.ui | 51 +++++++++++++++++++++++-- 17 files changed, 321 insertions(+), 35 deletions(-) diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index eaa5e9566..6c7db0f3d 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -138,6 +138,7 @@ DeviceConfig::ConfigureDevice(const _device_ *device, int instance, Settings *se { auto *cbox = new QComboBox(); cbox->setObjectName(config->name); + cbox->setMaxVisibleItems(30); auto *model = cbox->model(); int currentIndex = -1; int selected = config_get_int(device_context.name, const_cast(config->name), config->default_int); @@ -158,6 +159,7 @@ DeviceConfig::ConfigureDevice(const _device_ *device, int instance, Settings *se { auto *cbox = new QComboBox(); cbox->setObjectName(config->name); + cbox->setMaxVisibleItems(30); auto *model = cbox->model(); int currentIndex = -1; int selected = config_get_int(device_context.name, const_cast(config->name), config->default_int); @@ -181,6 +183,7 @@ DeviceConfig::ConfigureDevice(const _device_ *device, int instance, Settings *se { auto *cbox = new QComboBox(); cbox->setObjectName(config->name); + cbox->setMaxVisibleItems(30); auto *model = cbox->model(); int currentIndex = -1; int selected = 0; @@ -210,6 +213,7 @@ DeviceConfig::ConfigureDevice(const _device_ *device, int instance, Settings *se { auto *cbox = new QComboBox(); cbox->setObjectName(config->name); + cbox->setMaxVisibleItems(30); auto *model = cbox->model(); int currentIndex = -1; char *selected; @@ -269,6 +273,7 @@ DeviceConfig::ConfigureDevice(const _device_ *device, int instance, Settings *se { auto *cbox = new QComboBox(); cbox->setObjectName(config->name); + cbox->setMaxVisibleItems(30); auto *model = cbox->model(); int currentIndex = 0; auto serialDevices = EnumerateSerialDevices(); diff --git a/src/qt/qt_harddiskdialog.ui b/src/qt/qt_harddiskdialog.ui index 84c557660..91499d2cb 100644 --- a/src/qt/qt_harddiskdialog.ui +++ b/src/qt/qt_harddiskdialog.ui @@ -50,7 +50,11 @@ - + + + 30 + + @@ -106,7 +110,11 @@ - + + + 30 + + @@ -172,7 +180,11 @@ - + + + 30 + + @@ -182,10 +194,18 @@ - + + + 30 + + - + + + 30 + + @@ -207,7 +227,11 @@ - + + + 30 + + diff --git a/src/qt/qt_joystickconfiguration.cpp b/src/qt/qt_joystickconfiguration.cpp index e91cb9086..8523a258d 100644 --- a/src/qt/qt_joystickconfiguration.cpp +++ b/src/qt/qt_joystickconfiguration.cpp @@ -106,6 +106,7 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) auto label = new QLabel(joystick_get_axis_name(type, c), this); auto cbox = new QComboBox(this); cbox->setObjectName(QString("cboxAxis%1").arg(QString::number(c))); + cbox->setMaxVisibleItems(30); auto model = cbox->model(); for (int d = 0; d < plat_joystick_state[joystick].nr_axes; d++) { @@ -146,6 +147,7 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) auto label = new QLabel(joystick_get_button_name(type, c), this); auto cbox = new QComboBox(this); cbox->setObjectName(QString("cboxButton%1").arg(QString::number(c))); + cbox->setMaxVisibleItems(30); auto model = cbox->model(); for (int d = 0; d < plat_joystick_state[joystick].nr_buttons; d++) { @@ -172,6 +174,7 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) } auto cbox = new QComboBox(this); cbox->setObjectName(QString("cboxPov%1").arg(QString::number(c))); + cbox->setMaxVisibleItems(30); auto model = cbox->model(); for (int d = 0; d < plat_joystick_state[joystick].nr_povs; d++) { diff --git a/src/qt/qt_joystickconfiguration.ui b/src/qt/qt_joystickconfiguration.ui index 7789b48c4..139b99ca5 100644 --- a/src/qt/qt_joystickconfiguration.ui +++ b/src/qt/qt_joystickconfiguration.ui @@ -25,7 +25,11 @@ - + + + 30 + + diff --git a/src/qt/qt_newfloppydialog.ui b/src/qt/qt_newfloppydialog.ui index 7fb044fcc..c0437d810 100644 --- a/src/qt/qt_newfloppydialog.ui +++ b/src/qt/qt_newfloppydialog.ui @@ -52,6 +52,9 @@ + + 30 + 0 @@ -69,6 +72,9 @@ + + 30 + 0 diff --git a/src/qt/qt_progsettings.ui b/src/qt/qt_progsettings.ui index fa0818652..16fb439be 100644 --- a/src/qt/qt_progsettings.ui +++ b/src/qt/qt_progsettings.ui @@ -34,6 +34,9 @@ false + + 30 + (Default) @@ -109,6 +112,9 @@ + + 30 + (System Default) diff --git a/src/qt/qt_settingsdisplay.ui b/src/qt/qt_settingsdisplay.ui index c34c7aa38..dfda43c40 100644 --- a/src/qt/qt_settingsdisplay.ui +++ b/src/qt/qt_settingsdisplay.ui @@ -61,6 +61,9 @@ + + 30 + 0 @@ -119,6 +122,9 @@ + + 30 + 0 diff --git a/src/qt/qt_settingsfloppycdrom.ui b/src/qt/qt_settingsfloppycdrom.ui index 7a025e7a6..d7ad853b3 100644 --- a/src/qt/qt_settingsfloppycdrom.ui +++ b/src/qt/qt_settingsfloppycdrom.ui @@ -62,7 +62,11 @@ - + + + 30 + + @@ -150,16 +154,32 @@ - + + + 30 + + - + + + 30 + + - + + + 30 + + - + + + 30 + + diff --git a/src/qt/qt_settingsharddisks.ui b/src/qt/qt_settingsharddisks.ui index ef351e5e7..3ae20fee1 100644 --- a/src/qt/qt_settingsharddisks.ui +++ b/src/qt/qt_settingsharddisks.ui @@ -55,7 +55,11 @@ - + + + 30 + + @@ -65,7 +69,11 @@ - + + + 30 + + @@ -75,7 +83,11 @@ - + + + 30 + + diff --git a/src/qt/qt_settingsinput.ui b/src/qt/qt_settingsinput.ui index 8f4f46167..839461119 100644 --- a/src/qt/qt_settingsinput.ui +++ b/src/qt/qt_settingsinput.ui @@ -96,6 +96,9 @@ + + 30 + 0 @@ -105,7 +108,11 @@ - + + + 30 + + diff --git a/src/qt/qt_settingsmachine.ui b/src/qt/qt_settingsmachine.ui index 11da36ba6..22ecc15df 100644 --- a/src/qt/qt_settingsmachine.ui +++ b/src/qt/qt_settingsmachine.ui @@ -49,7 +49,11 @@ - + + + 30 + + @@ -59,7 +63,11 @@ - + + + 30 + + @@ -78,6 +86,9 @@ + + 30 + 0 @@ -95,6 +106,9 @@ + + 30 + 0 @@ -130,6 +144,9 @@ + + 30 + 0 @@ -150,6 +167,9 @@ + + 30 + 0 @@ -187,7 +207,11 @@ 0 - + + + 30 + + diff --git a/src/qt/qt_settingsnetwork.ui b/src/qt/qt_settingsnetwork.ui index b91511a31..8f1eb5a79 100644 --- a/src/qt/qt_settingsnetwork.ui +++ b/src/qt/qt_settingsnetwork.ui @@ -51,6 +51,9 @@ + + 30 + 0 @@ -74,6 +77,9 @@ + + 30 + 0 @@ -97,6 +103,9 @@ + + 30 + 0 @@ -170,6 +179,9 @@ + + 30 + 0 @@ -193,6 +205,9 @@ + + 30 + 0 @@ -216,6 +231,9 @@ + + 30 + 0 @@ -283,6 +301,9 @@ + + 30 + 0 @@ -306,6 +327,9 @@ + + 30 + 0 @@ -329,6 +353,9 @@ + + 30 + 0 @@ -402,6 +429,9 @@ + + 30 + 0 @@ -425,6 +455,9 @@ + + 30 + 0 @@ -448,6 +481,9 @@ + + 30 + 0 diff --git a/src/qt/qt_settingsotherperipherals.ui b/src/qt/qt_settingsotherperipherals.ui index 62a4b9308..01f5545f8 100644 --- a/src/qt/qt_settingsotherperipherals.ui +++ b/src/qt/qt_settingsotherperipherals.ui @@ -37,6 +37,9 @@ + + 30 + 0 @@ -68,7 +71,17 @@ - + + + 30 + + + + 0 + 0 + + + @@ -100,6 +113,9 @@ + + 30 + 0 @@ -116,10 +132,30 @@ - + + + 30 + + + + 0 + 0 + + + - + + + 30 + + + + 0 + 0 + + + diff --git a/src/qt/qt_settingsotherremovable.ui b/src/qt/qt_settingsotherremovable.ui index c57dd3ca2..219333376 100644 --- a/src/qt/qt_settingsotherremovable.ui +++ b/src/qt/qt_settingsotherremovable.ui @@ -69,10 +69,18 @@ - + + + 30 + + - + + + 30 + + @@ -82,7 +90,11 @@ - + + + 30 + + @@ -135,7 +147,11 @@ - + + + 30 + + @@ -145,7 +161,11 @@ - + + + 30 + + diff --git a/src/qt/qt_settingsports.ui b/src/qt/qt_settingsports.ui index 7a338aff5..bca870e5d 100644 --- a/src/qt/qt_settingsports.ui +++ b/src/qt/qt_settingsports.ui @@ -36,7 +36,11 @@ - + + + 30 + + @@ -46,7 +50,11 @@ - + + + 30 + + @@ -56,7 +64,11 @@ - + + + 30 + + @@ -66,7 +78,11 @@ - + + + 30 + + diff --git a/src/qt/qt_settingssound.ui b/src/qt/qt_settingssound.ui index f85a09a0d..1d5ab0050 100644 --- a/src/qt/qt_settingssound.ui +++ b/src/qt/qt_settingssound.ui @@ -94,6 +94,9 @@ + + 30 + 0 @@ -132,6 +135,9 @@ + + 30 + 0 @@ -198,6 +204,9 @@ + + 30 + 0 @@ -208,6 +217,9 @@ + + 30 + 0 @@ -218,6 +230,9 @@ + + 30 + 0 @@ -228,6 +243,9 @@ + + 30 + 0 diff --git a/src/qt/qt_settingsstoragecontrollers.ui b/src/qt/qt_settingsstoragecontrollers.ui index 9fc0ea519..d67127e2d 100644 --- a/src/qt/qt_settingsstoragecontrollers.ui +++ b/src/qt/qt_settingsstoragecontrollers.ui @@ -61,6 +61,9 @@ + + 30 + false @@ -78,6 +81,9 @@ + + 30 + 0 @@ -94,7 +100,11 @@ - + + + 30 + + @@ -161,6 +171,9 @@ + + 30 + 0 @@ -177,13 +190,43 @@ - + + + 30 + + + + 0 + 0 + + + - + + + 30 + + + + 0 + 0 + + + - + + + 30 + + + + 0 + 0 + + +