diff --git a/common/vsprops/QtCompile.props b/common/vsprops/QtCompile.props index e3caedf6c2b178..c85f3d4123293a 100644 --- a/common/vsprops/QtCompile.props +++ b/common/vsprops/QtCompile.props @@ -89,7 +89,7 @@ - + diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt index e7a4a11b5c1948..03d89969805fd6 100644 --- a/pcsx2-qt/CMakeLists.txt +++ b/pcsx2-qt/CMakeLists.txt @@ -133,6 +133,10 @@ target_sources(pcsx2-qt PRIVATE Settings/SettingsDialog.ui Settings/USBBindingWidget_DrivingForce.ui Settings/USBBindingWidget_GTForce.ui + CustomQtWidgets/NoScrollQComboBox.h + CustomQtWidgets/NoScrollQDoubleSpinBox.h + CustomQtWidgets/NoScrollQSlider.h + CustomQtWidgets/NoScrollQSpinBox.h Debugger/CpuWidget.cpp Debugger/CpuWidget.h Debugger/CpuWidget.ui @@ -186,6 +190,7 @@ target_include_directories(pcsx2-qt PRIVATE "${CMAKE_BINARY_DIR}/common/include" "${CMAKE_SOURCE_DIR}/pcsx2" "${CMAKE_SOURCE_DIR}/pcsx2-qt" + "${CMAKE_SOURCE_DIR}/pcsx2-qt/CustomQtWidgets" ) target_link_libraries(pcsx2-qt PRIVATE diff --git a/pcsx2-qt/CustomQtWidgets/NoScrollQComboBox.h b/pcsx2-qt/CustomQtWidgets/NoScrollQComboBox.h new file mode 100644 index 00000000000000..1a40ea274b076a --- /dev/null +++ b/pcsx2-qt/CustomQtWidgets/NoScrollQComboBox.h @@ -0,0 +1,36 @@ +#pragma once +#include + +class NoScrollQComboBox : public QComboBox +{ + Q_OBJECT + void wheelEvent(QWheelEvent* event) override + { + if (hasFocus()) + { + QComboBox::wheelEvent(event); + } + else + ((QEvent*)event)->ignore(); + }; + void focusInEvent(QFocusEvent* event) override + { + QComboBox::focusInEvent(event); + setPalette(HighlightPalette); + }; + void focusOutEvent(QFocusEvent* event) override + { + QComboBox::focusOutEvent(event); + setPalette(DefaultPalette); + }; + QPalette DefaultPalette; + QPalette HighlightPalette; +public: + explicit NoScrollQComboBox(QWidget *parent = nullptr) : QComboBox(parent) + { + setFocusPolicy(Qt::StrongFocus); + DefaultPalette = QPalette(); + HighlightPalette = QPalette(); + HighlightPalette.setColor(QPalette::Window, Qt::black); + } +}; diff --git a/pcsx2-qt/CustomQtWidgets/NoScrollQDoubleSpinBox.h b/pcsx2-qt/CustomQtWidgets/NoScrollQDoubleSpinBox.h new file mode 100644 index 00000000000000..d71d940d20915a --- /dev/null +++ b/pcsx2-qt/CustomQtWidgets/NoScrollQDoubleSpinBox.h @@ -0,0 +1,21 @@ +#pragma once +#include + +class NoScrollQDoubleSpinBox : public QDoubleSpinBox +{ + Q_OBJECT + void wheelEvent(QWheelEvent* event) override + { + if (hasFocus()) + { + QDoubleSpinBox::wheelEvent(event); + } + else + ((QEvent*)event)->ignore(); + }; +public: + explicit NoScrollQDoubleSpinBox(QWidget *parent = nullptr) : QDoubleSpinBox(parent) + { + setFocusPolicy(Qt::StrongFocus); + } +}; diff --git a/pcsx2-qt/CustomQtWidgets/NoScrollQSlider.h b/pcsx2-qt/CustomQtWidgets/NoScrollQSlider.h new file mode 100644 index 00000000000000..30a5ceed8d8cc4 --- /dev/null +++ b/pcsx2-qt/CustomQtWidgets/NoScrollQSlider.h @@ -0,0 +1,36 @@ +#pragma once +#include + +class NoScrollQSlider : public QSlider +{ + Q_OBJECT + void wheelEvent(QWheelEvent* event) override + { + if (hasFocus()) + { + QSlider::wheelEvent(event); + } + else + ((QEvent*)event)->ignore(); + }; + void focusInEvent(QFocusEvent* event) override + { + QSlider::focusInEvent(event); + setPalette(HighlightPalette); + }; + void focusOutEvent(QFocusEvent* event) override + { + QSlider::focusOutEvent(event); + setPalette(DefaultPalette); + }; + QPalette DefaultPalette; + QPalette HighlightPalette; +public: + explicit NoScrollQSlider(QWidget *parent = nullptr) : QSlider(parent) + { + setFocusPolicy(Qt::StrongFocus); + DefaultPalette = QPalette(); + HighlightPalette = QPalette(); + HighlightPalette.setColor(QPalette::Window, Qt::black); + } +}; diff --git a/pcsx2-qt/CustomQtWidgets/NoScrollQSpinBox.h b/pcsx2-qt/CustomQtWidgets/NoScrollQSpinBox.h new file mode 100644 index 00000000000000..782a5639421c13 --- /dev/null +++ b/pcsx2-qt/CustomQtWidgets/NoScrollQSpinBox.h @@ -0,0 +1,21 @@ +#pragma once +#include + +class NoScrollQSpinBox : public QSpinBox +{ + Q_OBJECT + void wheelEvent(QWheelEvent* event) override + { + if (hasFocus()) + { + QSpinBox::wheelEvent(event); + } + else + ((QEvent*)event)->ignore(); + }; +public: + explicit NoScrollQSpinBox(QWidget *parent = nullptr) : QSpinBox(parent) + { + setFocusPolicy(Qt::StrongFocus); + } +}; diff --git a/pcsx2-qt/Debugger/CpuWidget.cpp b/pcsx2-qt/Debugger/CpuWidget.cpp index f93b6834b56ab2..ecf6bb42940508 100644 --- a/pcsx2-qt/Debugger/CpuWidget.cpp +++ b/pcsx2-qt/Debugger/CpuWidget.cpp @@ -85,7 +85,7 @@ CpuWidget::CpuWidget(QWidget* parent, DebugInterface& cpu) connect(m_ui.btnSearch, &QPushButton::clicked, this, &CpuWidget::onSearchButtonClicked); connect(m_ui.listSearchResults, &QListWidget::itemDoubleClicked, [this](QListWidgetItem* item) { m_ui.memoryviewWidget->gotoAddress(item->data(256).toUInt()); }); - connect(m_ui.cmbSearchType, &QComboBox::currentIndexChanged, [this](int i) { + connect(m_ui.cmbSearchType, &NoScrollQComboBox::currentIndexChanged, [this](int i) { if (i < 4) m_ui.chkSearchHex->setEnabled(true); else diff --git a/pcsx2-qt/Debugger/CpuWidget.ui b/pcsx2-qt/Debugger/CpuWidget.ui index d6324a8eac95cb..7e7128e6fd0cc4 100644 --- a/pcsx2-qt/Debugger/CpuWidget.ui +++ b/pcsx2-qt/Debugger/CpuWidget.ui @@ -195,7 +195,7 @@ - + 1 Byte (8 bits) @@ -524,6 +524,11 @@
pcsx2-qt/Debugger/MemoryViewWidget.h
1 + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
diff --git a/pcsx2-qt/GameList/GameListWidget.cpp b/pcsx2-qt/GameList/GameListWidget.cpp index f7d274dcb7811a..4cfc9a41e699d4 100644 --- a/pcsx2-qt/GameList/GameListWidget.cpp +++ b/pcsx2-qt/GameList/GameListWidget.cpp @@ -137,12 +137,12 @@ void GameListWidget::initialize() connect(m_ui.viewGameList, &QPushButton::clicked, this, &GameListWidget::showGameList); connect(m_ui.viewGameGrid, &QPushButton::clicked, this, &GameListWidget::showGameGrid); - connect(m_ui.gridScale, &QSlider::valueChanged, this, &GameListWidget::gridIntScale); + connect(m_ui.gridScale, &NoScrollQSlider::valueChanged, this, &GameListWidget::gridIntScale); connect(m_ui.viewGridTitles, &QPushButton::toggled, this, &GameListWidget::setShowCoverTitles); - connect(m_ui.filterType, &QComboBox::currentIndexChanged, this, [this](int index) { + connect(m_ui.filterType, &NoScrollQComboBox::currentIndexChanged, this, [this](int index) { m_sort_model->setFilterType((index == 0) ? GameList::EntryType::Count : static_cast(index - 1)); }); - connect(m_ui.filterRegion, &QComboBox::currentIndexChanged, this, [this](int index) { + connect(m_ui.filterRegion, &NoScrollQComboBox::currentIndexChanged, this, [this](int index) { m_sort_model->setFilterRegion((index == 0) ? GameList::Region::Count : static_cast(index - 1)); }); connect(m_ui.searchText, &QLineEdit::textChanged, this, [this](const QString& text) { diff --git a/pcsx2-qt/GameList/GameListWidget.ui b/pcsx2-qt/GameList/GameListWidget.ui index 0602bcc7433827..5d33d3bb02a898 100644 --- a/pcsx2-qt/GameList/GameListWidget.ui +++ b/pcsx2-qt/GameList/GameListWidget.ui @@ -118,7 +118,7 @@
- + 125 @@ -163,7 +163,7 @@ 6 - + All Types @@ -176,7 +176,7 @@ - + All Regions @@ -213,6 +213,18 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+ + NoScrollQSlider + QSlider +
NoScrollQSlider.h
+
+
diff --git a/pcsx2-qt/QtUtils.cpp b/pcsx2-qt/QtUtils.cpp index 14b1e58ac0d904..28e953cb1bb42b 100644 --- a/pcsx2-qt/QtUtils.cpp +++ b/pcsx2-qt/QtUtils.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include "CustomQtWidgets/NoScrollQComboBox.h" #include #include #include diff --git a/pcsx2-qt/QtUtils.h b/pcsx2-qt/QtUtils.h index a657bca5996265..fe57b18f2f9701 100644 --- a/pcsx2-qt/QtUtils.h +++ b/pcsx2-qt/QtUtils.h @@ -28,7 +28,7 @@ class ByteStream; class QAction; -class QComboBox; +class NoScrollQComboBox; class QFrame; class QKeyEvent; class QTableView; diff --git a/pcsx2-qt/SettingWidgetBinder.h b/pcsx2-qt/SettingWidgetBinder.h index 17b300b5a6f7cf..dd024c6f122938 100644 --- a/pcsx2-qt/SettingWidgetBinder.h +++ b/pcsx2-qt/SettingWidgetBinder.h @@ -23,14 +23,14 @@ #include #include #include -#include -#include +#include "CustomQtWidgets/NoScrollQComboBox.h" +#include "CustomQtWidgets/NoScrollQDoubleSpinBox.h" #include #include #include #include -#include -#include +#include "CustomQtWidgets/NoScrollQSlider.h" +#include "CustomQtWidgets/NoScrollQSpinBox.h" #include "common/Path.h" @@ -116,13 +116,13 @@ namespace SettingWidgetBinder }; template <> - struct SettingAccessor + struct SettingAccessor { - static bool isNullValue(const QComboBox* widget) { return (widget->currentIndex() == 0); } + static bool isNullValue(const NoScrollQComboBox* widget) { return (widget->currentIndex() == 0); } - static bool getBoolValue(const QComboBox* widget) { return widget->currentIndex() > 0; } - static void setBoolValue(QComboBox* widget, bool value) { widget->setCurrentIndex(value ? 1 : 0); } - static void makeNullableBool(QComboBox* widget, bool globalValue) + static bool getBoolValue(const NoScrollQComboBox* widget) { return widget->currentIndex() > 0; } + static void setBoolValue(NoScrollQComboBox* widget, bool value) { widget->setCurrentIndex(value ? 1 : 0); } + static void makeNullableBool(NoScrollQComboBox* widget, bool globalValue) { //: THIS STRING IS SHARED ACROSS MULTIPLE OPTIONS. Be wary about gender/number. Also, ignore Crowdin's warning regarding [Enabled]: the text must be translated. widget->insertItem(0, globalValue ? qApp->translate("SettingsDialog", "Use Global Setting [Enabled]") : @@ -130,42 +130,42 @@ namespace SettingWidgetBinder qApp->translate("SettingsDialog", "Use Global Setting [Disabled]")); } - static int getIntValue(const QComboBox* widget) { return widget->currentIndex(); } - static void setIntValue(QComboBox* widget, int value) { widget->setCurrentIndex(value); } - static void makeNullableInt(QComboBox* widget, int globalValue) + static int getIntValue(const NoScrollQComboBox* widget) { return widget->currentIndex(); } + static void setIntValue(NoScrollQComboBox* widget, int value) { widget->setCurrentIndex(value); } + static void makeNullableInt(NoScrollQComboBox* widget, int globalValue) { widget->insertItem( 0, qApp->translate("SettingsDialog", "Use Global Setting [%1]") .arg((globalValue >= 0 && globalValue < widget->count()) ? widget->itemText(globalValue) : QString())); } - static std::optional getNullableIntValue(const QComboBox* widget) + static std::optional getNullableIntValue(const NoScrollQComboBox* widget) { return isNullValue(widget) ? std::nullopt : std::optional(widget->currentIndex() - 1); } - static void setNullableIntValue(QComboBox* widget, std::optional value) + static void setNullableIntValue(NoScrollQComboBox* widget, std::optional value) { widget->setCurrentIndex(value.has_value() ? (value.value() + 1) : 0); } - static float getFloatValue(const QComboBox* widget) { return static_cast(widget->currentIndex()); } - static void setFloatValue(QComboBox* widget, float value) { widget->setCurrentIndex(static_cast(value)); } - static void makeNullableFloat(QComboBox* widget, float globalValue) + static float getFloatValue(const NoScrollQComboBox* widget) { return static_cast(widget->currentIndex()); } + static void setFloatValue(NoScrollQComboBox* widget, float value) { widget->setCurrentIndex(static_cast(value)); } + static void makeNullableFloat(NoScrollQComboBox* widget, float globalValue) { widget->insertItem(0, qApp->translate("SettingsDialog", "Use Global Setting [%1]") .arg((globalValue >= 0.0f && static_cast(globalValue) < widget->count()) ? widget->itemText(static_cast(globalValue)) : QString())); } - static std::optional getNullableFloatValue(const QComboBox* widget) + static std::optional getNullableFloatValue(const NoScrollQComboBox* widget) { return isNullValue(widget) ? std::nullopt : std::optional(static_cast(widget->currentIndex() + 1)); } - static void setNullableFloatValue(QComboBox* widget, std::optional value) + static void setNullableFloatValue(NoScrollQComboBox* widget, std::optional value) { widget->setCurrentIndex(value.has_value() ? static_cast(value.value() + 1.0f) : 0); } - static QString getStringValue(const QComboBox* widget) + static QString getStringValue(const NoScrollQComboBox* widget) { const QVariant currentData(widget->currentData()); if (currentData.metaType().id() == QMetaType::QString) @@ -173,7 +173,7 @@ namespace SettingWidgetBinder return widget->currentText(); } - static void setStringValue(QComboBox* widget, const QString& value) + static void setStringValue(NoScrollQComboBox* widget, const QString& value) { const int index = widget->findData(value); if (index >= 0) @@ -184,23 +184,23 @@ namespace SettingWidgetBinder widget->setCurrentText(value); } - static void makeNullableString(QComboBox* widget, const QString& globalValue) + static void makeNullableString(NoScrollQComboBox* widget, const QString& globalValue) { makeNullableInt(widget, widget->findData(globalValue)); } - static std::optional getNullableStringValue(const QComboBox* widget) + static std::optional getNullableStringValue(const NoScrollQComboBox* widget) { return isNullValue(widget) ? std::nullopt : std::optional(getStringValue(widget)); } - static void setNullableStringValue(QComboBox* widget, std::optional value) + static void setNullableStringValue(NoScrollQComboBox* widget, std::optional value) { value.has_value() ? setStringValue(widget, value.value()) : widget->setCurrentIndex(0); } template - static void connectValueChanged(QComboBox* widget, F func) + static void connectValueChanged(NoScrollQComboBox* widget, F func) { - widget->connect(widget, static_cast(&QComboBox::currentIndexChanged), func); + widget->connect(widget, static_cast(&NoScrollQComboBox::currentIndexChanged), func); } }; @@ -265,130 +265,130 @@ namespace SettingWidgetBinder }; template <> - struct SettingAccessor + struct SettingAccessor { - static bool getBoolValue(const QSlider* widget) { return widget->value() > 0; } - static void setBoolValue(QSlider* widget, bool value) { widget->setValue(value ? 1 : 0); } - static void makeNullableBool(QSlider* widget, bool globalSetting) { widget->setEnabled(false); } - static std::optional getNullableBoolValue(const QSlider* widget) { return getBoolValue(widget); } - static void setNullableBoolValue(QSlider* widget, std::optional value) { setBoolValue(widget, value.value_or(false)); } - - static int getIntValue(const QSlider* widget) { return widget->value(); } - static void setIntValue(QSlider* widget, int value) { widget->setValue(value); } - static void makeNullableInt(QSlider* widget, int globalValue) { widget->setEnabled(false); } - static std::optional getNullableIntValue(const QSlider* widget) { return getIntValue(widget); } - static void setNullableIntValue(QSlider* widget, std::optional value) { setIntValue(widget, value.value_or(0)); } - - static float getFloatValue(const QSlider* widget) { return static_cast(widget->value()); } - static void setFloatValue(QSlider* widget, float value) { widget->setValue(static_cast(value)); } - static void makeNullableFloat(QSlider* widget, float globalValue) { widget->setEnabled(false); } - static std::optional getNullableFloatValue(const QSlider* widget) { return getFloatValue(widget); } - static void setNullableFloatValue(QSlider* widget, std::optional value) { setFloatValue(widget, value.value_or(0.0f)); } - - static QString getStringValue(const QSlider* widget) { return QString::number(widget->value()); } - static void setStringValue(QSlider* widget, const QString& value) { widget->setValue(value.toInt()); } - static void makeNullableString(QSlider* widget, const QString& globalValue) { widget->setEnabled(false); } - static std::optional getNullableStringValue(const QSlider* widget) { return getStringValue(widget); } - static void setNullableStringValue(QSlider* widget, std::optional value) + static bool getBoolValue(const NoScrollQSlider* widget) { return widget->value() > 0; } + static void setBoolValue(NoScrollQSlider* widget, bool value) { widget->setValue(value ? 1 : 0); } + static void makeNullableBool(NoScrollQSlider* widget, bool globalSetting) { widget->setEnabled(false); } + static std::optional getNullableBoolValue(const NoScrollQSlider* widget) { return getBoolValue(widget); } + static void setNullableBoolValue(NoScrollQSlider* widget, std::optional value) { setBoolValue(widget, value.value_or(false)); } + + static int getIntValue(const NoScrollQSlider* widget) { return widget->value(); } + static void setIntValue(NoScrollQSlider* widget, int value) { widget->setValue(value); } + static void makeNullableInt(NoScrollQSlider* widget, int globalValue) { widget->setEnabled(false); } + static std::optional getNullableIntValue(const NoScrollQSlider* widget) { return getIntValue(widget); } + static void setNullableIntValue(NoScrollQSlider* widget, std::optional value) { setIntValue(widget, value.value_or(0)); } + + static float getFloatValue(const NoScrollQSlider* widget) { return static_cast(widget->value()); } + static void setFloatValue(NoScrollQSlider* widget, float value) { widget->setValue(static_cast(value)); } + static void makeNullableFloat(NoScrollQSlider* widget, float globalValue) { widget->setEnabled(false); } + static std::optional getNullableFloatValue(const NoScrollQSlider* widget) { return getFloatValue(widget); } + static void setNullableFloatValue(NoScrollQSlider* widget, std::optional value) { setFloatValue(widget, value.value_or(0.0f)); } + + static QString getStringValue(const NoScrollQSlider* widget) { return QString::number(widget->value()); } + static void setStringValue(NoScrollQSlider* widget, const QString& value) { widget->setValue(value.toInt()); } + static void makeNullableString(NoScrollQSlider* widget, const QString& globalValue) { widget->setEnabled(false); } + static std::optional getNullableStringValue(const NoScrollQSlider* widget) { return getStringValue(widget); } + static void setNullableStringValue(NoScrollQSlider* widget, std::optional value) { setStringValue(widget, value.value_or(QString())); } template - static void connectValueChanged(QSlider* widget, F func) + static void connectValueChanged(NoScrollQSlider* widget, F func) { - widget->connect(widget, &QSlider::valueChanged, func); + widget->connect(widget, &NoScrollQSlider::valueChanged, func); } }; template <> - struct SettingAccessor + struct SettingAccessor { - static bool isNullable(const QSpinBox* widget) { return widget->property(NULLABLE_PROPERTY).toBool(); } + static bool isNullable(const NoScrollQSpinBox* widget) { return widget->property(NULLABLE_PROPERTY).toBool(); } - static void updateNullState(QSpinBox* widget, bool isNull) + static void updateNullState(NoScrollQSpinBox* widget, bool isNull) { widget->setPrefix(isNull ? qApp->translate("SettingWidgetBinder", "Default: ") : QString()); } - static bool getBoolValue(const QSpinBox* widget) { return widget->value() > 0; } - static void setBoolValue(QSpinBox* widget, bool value) { widget->setValue(value ? 1 : 0); } - static void makeNullableBool(QSpinBox* widget, bool globalSetting) + static bool getBoolValue(const NoScrollQSpinBox* widget) { return widget->value() > 0; } + static void setBoolValue(NoScrollQSpinBox* widget, bool value) { widget->setValue(value ? 1 : 0); } + static void makeNullableBool(NoScrollQSpinBox* widget, bool globalSetting) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalSetting)); } - static std::optional getNullableBoolValue(const QSpinBox* widget) + static std::optional getNullableBoolValue(const NoScrollQSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getBoolValue(widget); } - static void setNullableBoolValue(QSpinBox* widget, std::optional value) + static void setNullableBoolValue(NoScrollQSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setBoolValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toBool()); updateNullState(widget, !value.has_value()); } - static int getIntValue(const QSpinBox* widget) { return widget->value(); } - static void setIntValue(QSpinBox* widget, int value) { widget->setValue(value); } - static void makeNullableInt(QSpinBox* widget, int globalValue) + static int getIntValue(const NoScrollQSpinBox* widget) { return widget->value(); } + static void setIntValue(NoScrollQSpinBox* widget, int value) { widget->setValue(value); } + static void makeNullableInt(NoScrollQSpinBox* widget, int globalValue) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalValue)); } - static std::optional getNullableIntValue(const QSpinBox* widget) + static std::optional getNullableIntValue(const NoScrollQSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getIntValue(widget); } - static void setNullableIntValue(QSpinBox* widget, std::optional value) + static void setNullableIntValue(NoScrollQSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setIntValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toInt()); updateNullState(widget, !value.has_value()); } - static float getFloatValue(const QSpinBox* widget) { return static_cast(widget->value()); } - static void setFloatValue(QSpinBox* widget, float value) { widget->setValue(static_cast(value)); } - static void makeNullableFloat(QSpinBox* widget, float globalValue) + static float getFloatValue(const NoScrollQSpinBox* widget) { return static_cast(widget->value()); } + static void setFloatValue(NoScrollQSpinBox* widget, float value) { widget->setValue(static_cast(value)); } + static void makeNullableFloat(NoScrollQSpinBox* widget, float globalValue) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalValue)); } - static std::optional getNullableFloatValue(const QSpinBox* widget) + static std::optional getNullableFloatValue(const NoScrollQSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getFloatValue(widget); } - static void setNullableFloatValue(QSpinBox* widget, std::optional value) + static void setNullableFloatValue(NoScrollQSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setFloatValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toFloat()); updateNullState(widget, !value.has_value()); } - static QString getStringValue(const QSpinBox* widget) { return QString::number(widget->value()); } - static void setStringValue(QSpinBox* widget, const QString& value) { widget->setValue(value.toInt()); } - static void makeNullableString(QSpinBox* widget, const QString& globalValue) + static QString getStringValue(const NoScrollQSpinBox* widget) { return QString::number(widget->value()); } + static void setStringValue(NoScrollQSpinBox* widget, const QString& value) { widget->setValue(value.toInt()); } + static void makeNullableString(NoScrollQSpinBox* widget, const QString& globalValue) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalValue)); } - static std::optional getNullableStringValue(const QSpinBox* widget) + static std::optional getNullableStringValue(const NoScrollQSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getStringValue(widget); } - static void setNullableStringValue(QSpinBox* widget, std::optional value) + static void setNullableStringValue(NoScrollQSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setStringValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toString()); @@ -396,16 +396,16 @@ namespace SettingWidgetBinder } template - static void connectValueChanged(QSpinBox* widget, F func) + static void connectValueChanged(NoScrollQSpinBox* widget, F func) { if (!isNullable(widget)) { - widget->connect(widget, QOverload::of(&QSpinBox::valueChanged), func); + widget->connect(widget, QOverload::of(&NoScrollQSpinBox::valueChanged), func); } else { widget->setContextMenuPolicy(Qt::CustomContextMenu); - widget->connect(widget, &QSpinBox::customContextMenuRequested, widget, [widget, func](const QPoint& pt) { + widget->connect(widget, &NoScrollQSpinBox::customContextMenuRequested, widget, [widget, func](const QPoint& pt) { QMenu menu(widget); widget->connect(menu.addAction(qApp->translate("SettingWidgetBinder", "Reset")), &QAction::triggered, widget, [widget, func = std::move(func)]() { @@ -417,7 +417,7 @@ namespace SettingWidgetBinder }); menu.exec(widget->mapToGlobal(pt)); }); - widget->connect(widget, &QSpinBox::valueChanged, widget, [widget, func = std::move(func)]() { + widget->connect(widget, &NoScrollQSpinBox::valueChanged, widget, [widget, func = std::move(func)]() { if (widget->property(IS_NULL_PROPERTY).toBool()) { widget->setProperty(IS_NULL_PROPERTY, QVariant(false)); @@ -430,93 +430,93 @@ namespace SettingWidgetBinder }; template <> - struct SettingAccessor + struct SettingAccessor { - static bool isNullable(const QDoubleSpinBox* widget) { return widget->property(NULLABLE_PROPERTY).toBool(); } + static bool isNullable(const NoScrollQDoubleSpinBox* widget) { return widget->property(NULLABLE_PROPERTY).toBool(); } - static void updateNullState(QDoubleSpinBox* widget, bool isNull) + static void updateNullState(NoScrollQDoubleSpinBox* widget, bool isNull) { widget->setPrefix(isNull ? qApp->translate("SettingWidgetBinder", "Default: ") : QString()); } - static bool getBoolValue(const QDoubleSpinBox* widget) { return widget->value() > 0.0; } - static void setBoolValue(QDoubleSpinBox* widget, bool value) { widget->setValue(value ? 1.0 : 0.0); } - static void makeNullableBool(QDoubleSpinBox* widget, bool globalSetting) + static bool getBoolValue(const NoScrollQDoubleSpinBox* widget) { return widget->value() > 0.0; } + static void setBoolValue(NoScrollQDoubleSpinBox* widget, bool value) { widget->setValue(value ? 1.0 : 0.0); } + static void makeNullableBool(NoScrollQDoubleSpinBox* widget, bool globalSetting) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalSetting)); } - static std::optional getNullableBoolValue(const QDoubleSpinBox* widget) + static std::optional getNullableBoolValue(const NoScrollQDoubleSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getBoolValue(widget); } - static void setNullableBoolValue(QDoubleSpinBox* widget, std::optional value) + static void setNullableBoolValue(NoScrollQDoubleSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setBoolValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toBool()); updateNullState(widget, !value.has_value()); } - static int getIntValue(const QDoubleSpinBox* widget) { return static_cast(widget->value()); } - static void setIntValue(QDoubleSpinBox* widget, int value) { widget->setValue(static_cast(value)); } - static void makeNullableInt(QDoubleSpinBox* widget, int globalValue) + static int getIntValue(const NoScrollQDoubleSpinBox* widget) { return static_cast(widget->value()); } + static void setIntValue(NoScrollQDoubleSpinBox* widget, int value) { widget->setValue(static_cast(value)); } + static void makeNullableInt(NoScrollQDoubleSpinBox* widget, int globalValue) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalValue)); } - static std::optional getNullableIntValue(const QDoubleSpinBox* widget) + static std::optional getNullableIntValue(const NoScrollQDoubleSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getIntValue(widget); } - static void setNullableIntValue(QDoubleSpinBox* widget, std::optional value) + static void setNullableIntValue(NoScrollQDoubleSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setIntValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toInt()); updateNullState(widget, !value.has_value()); } - static float getFloatValue(const QDoubleSpinBox* widget) { return static_cast(widget->value()); } - static void setFloatValue(QDoubleSpinBox* widget, float value) { widget->setValue(static_cast(value)); } - static void makeNullableFloat(QDoubleSpinBox* widget, float globalValue) + static float getFloatValue(const NoScrollQDoubleSpinBox* widget) { return static_cast(widget->value()); } + static void setFloatValue(NoScrollQDoubleSpinBox* widget, float value) { widget->setValue(static_cast(value)); } + static void makeNullableFloat(NoScrollQDoubleSpinBox* widget, float globalValue) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalValue)); } - static std::optional getNullableFloatValue(const QDoubleSpinBox* widget) + static std::optional getNullableFloatValue(const NoScrollQDoubleSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getFloatValue(widget); } - static void setNullableFloatValue(QDoubleSpinBox* widget, std::optional value) + static void setNullableFloatValue(NoScrollQDoubleSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setFloatValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toFloat()); updateNullState(widget, !value.has_value()); } - static QString getStringValue(const QDoubleSpinBox* widget) { return QString::number(widget->value()); } - static void setStringValue(QDoubleSpinBox* widget, const QString& value) { widget->setValue(value.toDouble()); } - static void makeNullableString(QDoubleSpinBox* widget, const QString& globalValue) + static QString getStringValue(const NoScrollQDoubleSpinBox* widget) { return QString::number(widget->value()); } + static void setStringValue(NoScrollQDoubleSpinBox* widget, const QString& value) { widget->setValue(value.toDouble()); } + static void makeNullableString(NoScrollQDoubleSpinBox* widget, const QString& globalValue) { widget->setProperty(NULLABLE_PROPERTY, QVariant(true)); widget->setProperty(GLOBAL_VALUE_PROPERTY, QVariant(globalValue)); } - static std::optional getNullableStringValue(const QDoubleSpinBox* widget) + static std::optional getNullableStringValue(const NoScrollQDoubleSpinBox* widget) { if (widget->property(IS_NULL_PROPERTY).toBool()) return std::nullopt; return getStringValue(widget); } - static void setNullableStringValue(QDoubleSpinBox* widget, std::optional value) + static void setNullableStringValue(NoScrollQDoubleSpinBox* widget, std::optional value) { widget->setProperty(IS_NULL_PROPERTY, QVariant(!value.has_value())); setStringValue(widget, value.has_value() ? value.value() : widget->property(GLOBAL_VALUE_PROPERTY).toString()); @@ -524,16 +524,16 @@ namespace SettingWidgetBinder } template - static void connectValueChanged(QDoubleSpinBox* widget, F func) + static void connectValueChanged(NoScrollQDoubleSpinBox* widget, F func) { if (!isNullable(widget)) { - widget->connect(widget, QOverload::of(&QDoubleSpinBox::valueChanged), func); + widget->connect(widget, QOverload::of(&NoScrollQDoubleSpinBox::valueChanged), func); } else { widget->setContextMenuPolicy(Qt::CustomContextMenu); - widget->connect(widget, &QDoubleSpinBox::customContextMenuRequested, widget, [widget, func](const QPoint& pt) { + widget->connect(widget, &NoScrollQDoubleSpinBox::customContextMenuRequested, widget, [widget, func](const QPoint& pt) { QMenu menu(widget); widget->connect(menu.addAction(qApp->translate("SettingWidgetBinder", "Reset")), &QAction::triggered, widget, [widget, func = std::move(func)]() { @@ -545,7 +545,7 @@ namespace SettingWidgetBinder }); menu.exec(widget->mapToGlobal(pt)); }); - widget->connect(widget, QOverload::of(&QDoubleSpinBox::valueChanged), widget, [widget, func = std::move(func)]() { + widget->connect(widget, QOverload::of(&NoScrollQDoubleSpinBox::valueChanged), widget, [widget, func = std::move(func)]() { if (widget->property(IS_NULL_PROPERTY).toBool()) { widget->setProperty(IS_NULL_PROPERTY, QVariant(false)); @@ -1075,7 +1075,7 @@ namespace SettingWidgetBinder } } - static inline void BindSliderToIntSetting(SettingsInterface* sif, QSlider* slider, QLabel* label, const QString& label_suffix, + static inline void BindSliderToIntSetting(SettingsInterface* sif, NoScrollQSlider* slider, QLabel* label, const QString& label_suffix, std::string section, std::string key, s32 default_value) { const s32 global_value = Host::GetBaseIntSettingValue(section.c_str(), key.c_str(), default_value); @@ -1096,7 +1096,7 @@ namespace SettingWidgetBinder label->setFont(bold_font); slider->setContextMenuPolicy(Qt::CustomContextMenu); - slider->connect(slider, &QSpinBox::customContextMenuRequested, slider, + slider->connect(slider, &NoScrollQSpinBox::customContextMenuRequested, slider, [sif, slider, label, label_suffix, orig_font = std::move(orig_font), section, key, default_value](const QPoint& pt) { QMenu menu(slider); slider->connect(menu.addAction(qApp->translate("SettingWidgetBinder", "Reset")), &QAction::triggered, slider, @@ -1115,7 +1115,7 @@ namespace SettingWidgetBinder menu.exec(slider->mapToGlobal(pt)); }); - slider->connect(slider, &QSlider::valueChanged, slider, + slider->connect(slider, &NoScrollQSlider::valueChanged, slider, [sif, label, label_suffix, section = std::move(section), key = std::move(key), orig_font = std::move(orig_font), bold_font = std::move(bold_font)](int value) { label->setText(QStringLiteral("%1%2").arg(value).arg(label_suffix)); @@ -1132,7 +1132,7 @@ namespace SettingWidgetBinder slider->setValue(global_value); label->setText(QStringLiteral("%1%2").arg(global_value).arg(label_suffix)); - slider->connect(slider, &QSlider::valueChanged, slider, + slider->connect(slider, &NoScrollQSlider::valueChanged, slider, [label, label_suffix, section = std::move(section), key = std::move(key)](int value) { label->setText(QStringLiteral("%1%2").arg(value).arg(label_suffix)); Host::SetBaseIntSettingValue(section.c_str(), key.c_str(), value); diff --git a/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp b/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp index 1d676a363777c3..11b8c9f7d67e53 100644 --- a/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp +++ b/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp @@ -55,9 +55,9 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* m_ui.eeClampMode->setCurrentIndex(getClampingModeIndex(-1)); m_ui.vu0ClampMode->setCurrentIndex(getClampingModeIndex(0)); m_ui.vu1ClampMode->setCurrentIndex(getClampingModeIndex(1)); - connect(m_ui.eeClampMode, QOverload::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(-1, index); }); - connect(m_ui.vu0ClampMode, QOverload::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(0, index); }); - connect(m_ui.vu1ClampMode, QOverload::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(1, index); }); + connect(m_ui.eeClampMode, QOverload::of(&NoScrollQComboBox::currentIndexChanged), [this](int index) { setClampingMode(-1, index); }); + connect(m_ui.vu0ClampMode, QOverload::of(&NoScrollQComboBox::currentIndexChanged), [this](int index) { setClampingMode(0, index); }); + connect(m_ui.vu1ClampMode, QOverload::of(&NoScrollQComboBox::currentIndexChanged), [this](int index) { setClampingMode(1, index); }); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.iopRecompiler, "EmuCore/CPU/Recompiler", "EnableIOP", true); diff --git a/pcsx2-qt/Settings/AdvancedSettingsWidget.ui b/pcsx2-qt/Settings/AdvancedSettingsWidget.ui index 67717592fb3d25..c9a5a02b4eb725 100644 --- a/pcsx2-qt/Settings/AdvancedSettingsWidget.ui +++ b/pcsx2-qt/Settings/AdvancedSettingsWidget.ui @@ -74,7 +74,7 @@
- + Nearest @@ -105,7 +105,7 @@ - + None @@ -191,7 +191,7 @@ - + Nearest @@ -240,7 +240,7 @@ - + None @@ -285,7 +285,7 @@ - + Nearest @@ -309,7 +309,7 @@ - + None @@ -381,7 +381,7 @@ - + hz @@ -391,7 +391,7 @@ - + hz @@ -475,6 +475,18 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+ + NoScrollQDoubleSpinBox + QDoubleSpinBox +
NoScrollQDoubleSpinBox.h
+
+
diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.cpp b/pcsx2-qt/Settings/AudioSettingsWidget.cpp index f567c20eecf1c4..a0d184f6672f66 100644 --- a/pcsx2-qt/Settings/AudioSettingsWidget.cpp +++ b/pcsx2-qt/Settings/AudioSettingsWidget.cpp @@ -51,8 +51,8 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.syncMode, "SPU2/Output", "SynchMode", DEFAULT_SYNCHRONIZATION_MODE); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.expansionMode, "SPU2/Output", "SpeakerConfiguration", DEFAULT_EXPANSION_MODE); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.dplLevel, "SPU2/Output", "DplDecodingLevel", DEFAULT_DPL_DECODING_LEVEL); - connect(m_ui.syncMode, QOverload::of(&QComboBox::currentIndexChanged), this, &AudioSettingsWidget::updateTargetLatencyRange); - connect(m_ui.expansionMode, QOverload::of(&QComboBox::currentIndexChanged), this, &AudioSettingsWidget::expansionModeChanged); + connect(m_ui.syncMode, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &AudioSettingsWidget::updateTargetLatencyRange); + connect(m_ui.expansionMode, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &AudioSettingsWidget::expansionModeChanged); updateTargetLatencyRange(); expansionModeChanged(); @@ -63,20 +63,20 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent SettingWidgetBinder::BindSliderToIntSetting( sif, m_ui.outputLatency, m_ui.outputLatencyLabel, tr(" ms"), "SPU2/Output", "OutputLatency", DEFAULT_OUTPUT_LATENCY); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.outputLatencyMinimal, "SPU2/Output", "OutputLatencyMinimal", false); - connect(m_ui.outputModule, &QComboBox::currentIndexChanged, this, &AudioSettingsWidget::outputModuleChanged); - connect(m_ui.backend, &QComboBox::currentIndexChanged, this, &AudioSettingsWidget::outputBackendChanged); - connect(m_ui.targetLatency, &QSlider::valueChanged, this, &AudioSettingsWidget::updateLatencyLabels); - connect(m_ui.outputLatency, &QSlider::valueChanged, this, &AudioSettingsWidget::updateLatencyLabels); + connect(m_ui.outputModule, &NoScrollQComboBox::currentIndexChanged, this, &AudioSettingsWidget::outputModuleChanged); + connect(m_ui.backend, &NoScrollQComboBox::currentIndexChanged, this, &AudioSettingsWidget::outputBackendChanged); + connect(m_ui.targetLatency, &NoScrollQSlider::valueChanged, this, &AudioSettingsWidget::updateLatencyLabels); + connect(m_ui.outputLatency, &NoScrollQSlider::valueChanged, this, &AudioSettingsWidget::updateLatencyLabels); connect(m_ui.outputLatencyMinimal, &QCheckBox::stateChanged, this, &AudioSettingsWidget::updateLatencyLabels); connect(m_ui.outputLatencyMinimal, &QCheckBox::stateChanged, this, &AudioSettingsWidget::onMinimalOutputLatencyStateChanged); outputModuleChanged(); m_ui.volume->setValue(m_dialog->getEffectiveIntValue("SPU2/Mixing", "FinalVolume", DEFAULT_VOLUME)); - connect(m_ui.volume, &QSlider::valueChanged, this, &AudioSettingsWidget::volumeChanged); + connect(m_ui.volume, &NoScrollQSlider::valueChanged, this, &AudioSettingsWidget::volumeChanged); updateVolumeLabel(); if (dialog->isPerGameSettings()) { - connect(m_ui.volume, &QSlider::customContextMenuRequested, this, &AudioSettingsWidget::volumeContextMenuRequested); + connect(m_ui.volume, &NoScrollQSlider::customContextMenuRequested, this, &AudioSettingsWidget::volumeContextMenuRequested); m_ui.volume->setContextMenuPolicy(Qt::CustomContextMenu); if (sif->ContainsValue("SPU2/Mixing", "FinalVolume")) { diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.ui b/pcsx2-qt/Settings/AudioSettingsWidget.ui index 6e6be4588820d3..b22e58b930b1a0 100644 --- a/pcsx2-qt/Settings/AudioSettingsWidget.ui +++ b/pcsx2-qt/Settings/AudioSettingsWidget.ui @@ -42,7 +42,7 @@ - + 20 @@ -56,7 +56,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow 10 @@ -82,7 +82,7 @@ - + 10 @@ -96,7 +96,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow 2 @@ -122,7 +122,7 @@ - + 5 @@ -136,7 +136,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow 1 @@ -194,7 +194,7 @@ - + 0 @@ -217,7 +217,7 @@ Qt::Vertical - QSlider::TicksBothSides + NoScrollQSlider::TicksBothSides 10 @@ -285,7 +285,7 @@ - + TimeStretch (Recommended) @@ -311,7 +311,7 @@ - + Stereo (None, Default) @@ -342,7 +342,7 @@ - + None (Default) @@ -370,7 +370,7 @@ - + 15 @@ -384,7 +384,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow 200 @@ -417,7 +417,7 @@ - + @@ -429,7 +429,7 @@ - + 10 @@ -443,7 +443,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow 200 @@ -474,7 +474,7 @@ - + @@ -494,13 +494,25 @@ - + + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+ + NoScrollQSlider + QSlider +
NoScrollQSlider.h
+
+
diff --git a/pcsx2-qt/Settings/ControllerBindingWidget.ui b/pcsx2-qt/Settings/ControllerBindingWidget.ui index b4884ec06b3ac2..c81a1938362acb 100644 --- a/pcsx2-qt/Settings/ControllerBindingWidget.ui +++ b/pcsx2-qt/Settings/ControllerBindingWidget.ui @@ -35,7 +35,7 @@ - + @@ -152,6 +152,13 @@
+ + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+
diff --git a/pcsx2-qt/Settings/ControllerBindingWidgets.cpp b/pcsx2-qt/Settings/ControllerBindingWidgets.cpp index 36a00c9c6cb36d..b2ffa7c9575e2b 100644 --- a/pcsx2-qt/Settings/ControllerBindingWidgets.cpp +++ b/pcsx2-qt/Settings/ControllerBindingWidgets.cpp @@ -54,7 +54,7 @@ ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSett ControllerSettingWidgetBinder::BindWidgetToInputProfileString( m_dialog->getProfileSettingsInterface(), m_ui.controllerType, m_config_section, "Type", PAD::GetDefaultPadType(port)); - connect(m_ui.controllerType, QOverload::of(&QComboBox::currentIndexChanged), this, &ControllerBindingWidget::onTypeChanged); + connect(m_ui.controllerType, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &ControllerBindingWidget::onTypeChanged); connect(m_ui.bindings, &QPushButton::clicked, this, &ControllerBindingWidget::onBindingsClicked); connect(m_ui.settings, &QPushButton::clicked, this, &ControllerBindingWidget::onSettingsClicked); connect(m_ui.macros, &QPushButton::clicked, this, &ControllerBindingWidget::onMacrosClicked); @@ -350,7 +350,7 @@ ControllerMacroEditWidget::ControllerMacroEditWidget(ControllerMacroWidget* pare ControllerSettingWidgetBinder::BindWidgetToInputProfileNormalized( dialog->getProfileSettingsInterface(), m_ui.pressure, section, fmt::format("Macro{}Pressure", index + 1u), 100.0f, 1.0f); - connect(m_ui.pressure, &QSlider::valueChanged, this, &ControllerMacroEditWidget::onPressureChanged); + connect(m_ui.pressure, &NoScrollQSlider::valueChanged, this, &ControllerMacroEditWidget::onPressureChanged); onPressureChanged(); m_frequency = dialog->getIntValue(section.c_str(), fmt::format("Macro{}Frequency", index + 1u).c_str(), 0); @@ -565,7 +565,7 @@ void ControllerCustomSettingsWidget::createSettingWidgets(const char* translatio case SettingInfo::Type::Integer: { - QSpinBox* sb = new QSpinBox(widget_parent); + NoScrollQSpinBox* sb = new NoScrollQSpinBox(widget_parent); sb->setObjectName(QString::fromUtf8(si.name)); sb->setMinimum(si.IntegerMinValue()); sb->setMaximum(si.IntegerMaxValue()); @@ -586,7 +586,7 @@ void ControllerCustomSettingsWidget::createSettingWidgets(const char* translatio case SettingInfo::Type::IntegerList: { - QComboBox* cb = new QComboBox(widget_parent); + NoScrollQComboBox* cb = new NoScrollQComboBox(widget_parent); cb->setObjectName(QString::fromUtf8(si.name)); for (u32 i = 0; si.options[i] != nullptr; i++) cb->addItem(qApp->translate(translation_ctx, si.options[i])); @@ -600,7 +600,7 @@ void ControllerCustomSettingsWidget::createSettingWidgets(const char* translatio case SettingInfo::Type::Float: { - QDoubleSpinBox* sb = new QDoubleSpinBox(widget_parent); + NoScrollQDoubleSpinBox* sb = new NoScrollQDoubleSpinBox(widget_parent); sb->setObjectName(QString::fromUtf8(si.name)); sb->setMinimum(si.FloatMinValue() * si.multiplier); sb->setMaximum(si.FloatMaxValue() * si.multiplier); @@ -637,7 +637,7 @@ void ControllerCustomSettingsWidget::createSettingWidgets(const char* translatio case SettingInfo::Type::StringList: { - QComboBox* cb = new QComboBox(widget_parent); + NoScrollQComboBox* cb = new NoScrollQComboBox(widget_parent); cb->setObjectName(QString::fromUtf8(si.name)); if (si.get_options) { @@ -718,7 +718,7 @@ void ControllerCustomSettingsWidget::restoreDefaults() case SettingInfo::Type::Integer: { - QSpinBox* widget = findChild(QString::fromStdString(si.name)); + NoScrollQSpinBox* widget = findChild(QString::fromStdString(si.name)); if (widget) widget->setValue(si.IntegerDefaultValue()); } @@ -726,7 +726,7 @@ void ControllerCustomSettingsWidget::restoreDefaults() case SettingInfo::Type::IntegerList: { - QComboBox* widget = findChild(QString::fromStdString(si.name)); + NoScrollQComboBox* widget = findChild(QString::fromStdString(si.name)); if (widget) widget->setCurrentIndex(si.IntegerDefaultValue() - si.IntegerMinValue()); } @@ -734,7 +734,7 @@ void ControllerCustomSettingsWidget::restoreDefaults() case SettingInfo::Type::Float: { - QDoubleSpinBox* widget = findChild(QString::fromStdString(si.name)); + NoScrollQDoubleSpinBox* widget = findChild(QString::fromStdString(si.name)); if (widget) widget->setValue(si.FloatDefaultValue() * si.multiplier); } @@ -750,7 +750,7 @@ void ControllerCustomSettingsWidget::restoreDefaults() case SettingInfo::Type::StringList: { - QComboBox* widget = findChild(QString::fromStdString(si.name)); + NoScrollQComboBox* widget = findChild(QString::fromStdString(si.name)); if (widget) { const QString default_value(QString::fromUtf8(si.StringDefaultValue())); @@ -884,8 +884,8 @@ USBDeviceWidget::USBDeviceWidget(QWidget* parent, ControllerSettingsDialog* dial ControllerSettingWidgetBinder::BindWidgetToInputProfileString( m_dialog->getProfileSettingsInterface(), m_ui.deviceType, m_config_section, "Type", "None"); - connect(m_ui.deviceType, QOverload::of(&QComboBox::currentIndexChanged), this, &USBDeviceWidget::onTypeChanged); - connect(m_ui.deviceSubtype, QOverload::of(&QComboBox::currentIndexChanged), this, &USBDeviceWidget::onSubTypeChanged); + connect(m_ui.deviceType, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &USBDeviceWidget::onTypeChanged); + connect(m_ui.deviceSubtype, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &USBDeviceWidget::onSubTypeChanged); connect(m_ui.bindings, &QPushButton::clicked, this, &USBDeviceWidget::onBindingsClicked); connect(m_ui.settings, &QPushButton::clicked, this, &USBDeviceWidget::onSettingsClicked); connect(m_ui.automaticBinding, &QPushButton::clicked, this, &USBDeviceWidget::onAutomaticBindingClicked); diff --git a/pcsx2-qt/Settings/ControllerGlobalSettingsWidget.cpp b/pcsx2-qt/Settings/ControllerGlobalSettingsWidget.cpp index a991aa2183795b..226edc1f4e05ef 100644 --- a/pcsx2-qt/Settings/ControllerGlobalSettingsWidget.cpp +++ b/pcsx2-qt/Settings/ControllerGlobalSettingsWidget.cpp @@ -183,11 +183,11 @@ ControllerMouseSettingsDialog::ControllerMouseSettingsDialog(QWidget* parent, Co ControllerSettingWidgetBinder::BindWidgetToInputProfileFloat(sif, m_ui.pointerYDeadZoneSlider, "Pad", "PointerYDeadZone", 20.0f); ControllerSettingWidgetBinder::BindWidgetToInputProfileFloat(sif, m_ui.pointerInertiaSlider, "Pad", "PointerInertia", 10.0f); - connect(m_ui.pointerXSpeedSlider, &QSlider::valueChanged, this, [this](int value) { m_ui.pointerXSpeedVal->setText(QStringLiteral("%1").arg(value)); }); - connect(m_ui.pointerYSpeedSlider, &QSlider::valueChanged, this, [this](int value) { m_ui.pointerYSpeedVal->setText(QStringLiteral("%1").arg(value)); }); - connect(m_ui.pointerXDeadZoneSlider, &QSlider::valueChanged, this, [this](int value) { m_ui.pointerXDeadZoneVal->setText(QStringLiteral("%1").arg(value)); }); - connect(m_ui.pointerYDeadZoneSlider, &QSlider::valueChanged, this, [this](int value) { m_ui.pointerYDeadZoneVal->setText(QStringLiteral("%1").arg(value)); }); - connect(m_ui.pointerInertiaSlider, &QSlider::valueChanged, this, [this](int value) { m_ui.pointerInertiaVal->setText(QStringLiteral("%1").arg(value)); }); + connect(m_ui.pointerXSpeedSlider, &NoScrollQSlider::valueChanged, this, [this](int value) { m_ui.pointerXSpeedVal->setText(QStringLiteral("%1").arg(value)); }); + connect(m_ui.pointerYSpeedSlider, &NoScrollQSlider::valueChanged, this, [this](int value) { m_ui.pointerYSpeedVal->setText(QStringLiteral("%1").arg(value)); }); + connect(m_ui.pointerXDeadZoneSlider, &NoScrollQSlider::valueChanged, this, [this](int value) { m_ui.pointerXDeadZoneVal->setText(QStringLiteral("%1").arg(value)); }); + connect(m_ui.pointerYDeadZoneSlider, &NoScrollQSlider::valueChanged, this, [this](int value) { m_ui.pointerYDeadZoneVal->setText(QStringLiteral("%1").arg(value)); }); + connect(m_ui.pointerInertiaSlider, &NoScrollQSlider::valueChanged, this, [this](int value) { m_ui.pointerInertiaVal->setText(QStringLiteral("%1").arg(value)); }); m_ui.pointerXSpeedVal->setText(QStringLiteral("%1").arg(m_ui.pointerXSpeedSlider->value())); m_ui.pointerYSpeedVal->setText(QStringLiteral("%1").arg(m_ui.pointerYSpeedSlider->value())); diff --git a/pcsx2-qt/Settings/ControllerMacroEditWidget.ui b/pcsx2-qt/Settings/ControllerMacroEditWidget.ui index 31f3c5f44e5370..463bc85831d564 100644 --- a/pcsx2-qt/Settings/ControllerMacroEditWidget.ui +++ b/pcsx2-qt/Settings/ControllerMacroEditWidget.ui @@ -67,7 +67,7 @@ - + 1 @@ -81,7 +81,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow @@ -200,6 +200,11 @@ QPushButton
Settings/InputBindingWidget.h
+ + NoScrollQSlider + QSlider +
NoScrollQSlider.h
+
diff --git a/pcsx2-qt/Settings/ControllerMouseSettingsDialog.ui b/pcsx2-qt/Settings/ControllerMouseSettingsDialog.ui index 766f3a62d16b86..156eccbcf6f0d3 100644 --- a/pcsx2-qt/Settings/ControllerMouseSettingsDialog.ui +++ b/pcsx2-qt/Settings/ControllerMouseSettingsDialog.ui @@ -43,7 +43,7 @@
- + 0 @@ -110,7 +110,7 @@ - + 0 @@ -229,7 +229,7 @@ - + 0 @@ -296,7 +296,7 @@ - + 0 @@ -363,7 +363,7 @@ - + 0 @@ -410,6 +410,13 @@
+ + + NoScrollQSlider + QSlider +
NoScrollQSlider.h
+
+
diff --git a/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h b/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h index ee502685e654c6..5a1007baf7f7c3 100644 --- a/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h +++ b/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h @@ -26,11 +26,11 @@ #include #include #include -#include -#include +#include "CustomQtWidgets/NoScrollQComboBox.h" +#include "CustomQtWidgets/NoScrollQDoubleSpinBox.h" #include -#include -#include +#include "CustomQtWidgets/NoScrollQSlider.h" +#include "CustomQtWidgets/NoScrollQSpinBox.h" /// This nastyness is required because input profiles aren't overlaid settings like the rest of them, it's /// input profile *or* global, not both. diff --git a/pcsx2-qt/Settings/ControllerSettingsDialog.cpp b/pcsx2-qt/Settings/ControllerSettingsDialog.cpp index 3fefc5b356f954..52e7e30bf3b8fe 100644 --- a/pcsx2-qt/Settings/ControllerSettingsDialog.cpp +++ b/pcsx2-qt/Settings/ControllerSettingsDialog.cpp @@ -48,7 +48,7 @@ ControllerSettingsDialog::ControllerSettingsDialog(QWidget* parent /* = nullptr m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this, &ControllerSettingsDialog::onCategoryCurrentRowChanged); - connect(m_ui.currentProfile, &QComboBox::currentIndexChanged, this, &ControllerSettingsDialog::onCurrentProfileChanged); + connect(m_ui.currentProfile, &NoScrollQComboBox::currentIndexChanged, this, &ControllerSettingsDialog::onCurrentProfileChanged); connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &ControllerSettingsDialog::close); connect(m_ui.newProfile, &QPushButton::clicked, this, &ControllerSettingsDialog::onNewProfileClicked); connect(m_ui.loadProfile, &QPushButton::clicked, this, &ControllerSettingsDialog::onLoadProfileClicked); diff --git a/pcsx2-qt/Settings/ControllerSettingsDialog.ui b/pcsx2-qt/Settings/ControllerSettingsDialog.ui index cebf55c8f299da..8438636519f8f1 100644 --- a/pcsx2-qt/Settings/ControllerSettingsDialog.ui +++ b/pcsx2-qt/Settings/ControllerSettingsDialog.ui @@ -73,7 +73,7 @@
- + 0 @@ -145,6 +145,13 @@
+ + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+
diff --git a/pcsx2-qt/Settings/DEV9SettingsWidget.cpp b/pcsx2-qt/Settings/DEV9SettingsWidget.cpp index 09290128eae10e..c179aeda55c70d 100644 --- a/pcsx2-qt/Settings/DEV9SettingsWidget.cpp +++ b/pcsx2-qt/Settings/DEV9SettingsWidget.cpp @@ -78,7 +78,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsDialog* dialog, QWidget* parent) ////////////////////////////////////////////////////////////////////////// // Eth Device Settings ////////////////////////////////////////////////////////////////////////// - connect(m_ui.ethDevType, QOverload::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceTypeChanged); + connect(m_ui.ethDevType, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceTypeChanged); m_api_list.push_back(Pcsx2Config::DEV9Options::NetApi::Unset); @@ -153,7 +153,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsDialog* dialog, QWidget* parent) } //onEthDeviceTypeChanged gets called automatically - connect(m_ui.ethDev, QOverload::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged); + connect(m_ui.ethDev, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged); ////////////////////////////////////////////////////////////////////////// // DHCP Settings @@ -214,12 +214,12 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsDialog* dialog, QWidget* parent) SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.ethDNS1Mode, "DEV9/Eth", "ModeDNS1", s_dns_name, Pcsx2Config::DEV9Options::DnsModeNames, Pcsx2Config::DEV9Options::DnsModeNames[static_cast(Pcsx2Config::DEV9Options::DnsMode::Auto)], "DEV9SettingsWidget"); onEthDNSModeChanged(m_ui.ethDNS1Mode, m_ui.ethDNS1Mode->currentIndex(), m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1"); - connect(m_ui.ethDNS1Mode, QOverload::of(&QComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS1Mode, index, m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1"); }); + connect(m_ui.ethDNS1Mode, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS1Mode, index, m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1"); }); SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.ethDNS2Mode, "DEV9/Eth", "ModeDNS2", s_dns_name, Pcsx2Config::DEV9Options::DnsModeNames, Pcsx2Config::DEV9Options::DnsModeNames[static_cast(Pcsx2Config::DEV9Options::DnsMode::Auto)], "DEV9SettingsWidget"); onEthDNSModeChanged(m_ui.ethDNS2Mode, m_ui.ethDNS2Mode->currentIndex(), m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2"); - connect(m_ui.ethDNS2Mode, QOverload::of(&QComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS2Mode, index, m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2"); }); + connect(m_ui.ethDNS2Mode, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS2Mode, index, m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2"); }); ////////////////////////////////////////////////////////////////////////// // DNS Settings @@ -279,22 +279,22 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsDialog* dialog, QWidget* parent) sizeOpt = size; const int sizeGlobal = (u64)Host::GetBaseIntSettingValue("DEV9/Hdd", "HddSizeSectors", 0) * 512 / (1024 * 1024 * 1024); - SettingWidgetBinder::SettingAccessor::makeNullableInt(m_ui.hddSizeSpinBox, sizeGlobal); - SettingWidgetBinder::SettingAccessor::setNullableIntValue(m_ui.hddSizeSpinBox, sizeOpt); + SettingWidgetBinder::SettingAccessor::makeNullableInt(m_ui.hddSizeSpinBox, sizeGlobal); + SettingWidgetBinder::SettingAccessor::setNullableIntValue(m_ui.hddSizeSpinBox, sizeOpt); m_ui.hddSizeSlider->setValue(sizeOpt.value_or(sizeGlobal)); m_ui.hddSizeSlider->setContextMenuPolicy(Qt::CustomContextMenu); - connect(m_ui.hddSizeSlider, &QSlider::customContextMenuRequested, this, &DEV9SettingsWidget::onHddSizeSliderContext); + connect(m_ui.hddSizeSlider, &NoScrollQSlider::customContextMenuRequested, this, &DEV9SettingsWidget::onHddSizeSliderContext); } else { m_ui.hddSizeSlider->setValue(size); - SettingWidgetBinder::SettingAccessor::setIntValue(m_ui.hddSizeSpinBox, size); + SettingWidgetBinder::SettingAccessor::setIntValue(m_ui.hddSizeSpinBox, size); } - connect(m_ui.hddSizeSlider, QOverload::of(&QSlider::valueChanged), this, &DEV9SettingsWidget::onHddSizeSlide); - SettingWidgetBinder::SettingAccessor::connectValueChanged(m_ui.hddSizeSpinBox, [&]() { onHddSizeAccessorSpin(); }); + connect(m_ui.hddSizeSlider, QOverload::of(&NoScrollQSlider::valueChanged), this, &DEV9SettingsWidget::onHddSizeSlide); + SettingWidgetBinder::SettingAccessor::connectValueChanged(m_ui.hddSizeSpinBox, [&]() { onHddSizeAccessorSpin(); }); connect(m_ui.hddCreate, &QPushButton::clicked, this, &DEV9SettingsWidget::onHddCreateClicked); } @@ -454,7 +454,7 @@ void DEV9SettingsWidget::onEthAutoChanged(QCheckBox* sender, int state, QLineEdi input->setEnabled(false); } -void DEV9SettingsWidget::onEthDNSModeChanged(QComboBox* sender, int index, QLineEdit* input, const char* section, const char* key) +void DEV9SettingsWidget::onEthDNSModeChanged(NoScrollQComboBox* sender, int index, QLineEdit* input, const char* section, const char* key) { if (sender->isEnabled()) { @@ -760,7 +760,7 @@ void DEV9SettingsWidget::onHddSizeSlide(int i) { // We have to call onHddSizeAccessorSpin() ourself, as the value could still be considered null when the valueChanged signal is fired QSignalBlocker sb(m_ui.hddSizeSpinBox); - SettingWidgetBinder::SettingAccessor::setNullableIntValue(m_ui.hddSizeSpinBox, i); + SettingWidgetBinder::SettingAccessor::setNullableIntValue(m_ui.hddSizeSpinBox, i); onHddSizeAccessorSpin(); } @@ -775,7 +775,7 @@ void DEV9SettingsWidget::onHddSizeSliderReset([[maybe_unused]] bool checked) { // We have to call onHddSizeAccessorSpin() ourself, as the value could still be considered non-null when the valueChanged signal is fired QSignalBlocker sb(m_ui.hddSizeSpinBox); - SettingWidgetBinder::SettingAccessor::setNullableIntValue(m_ui.hddSizeSpinBox, std::nullopt); + SettingWidgetBinder::SettingAccessor::setNullableIntValue(m_ui.hddSizeSpinBox, std::nullopt); onHddSizeAccessorSpin(); } @@ -785,7 +785,7 @@ void DEV9SettingsWidget::onHddSizeAccessorSpin() QSignalBlocker sb(m_ui.hddSizeSlider); if (m_dialog->isPerGameSettings()) { - std::optional new_value = SettingWidgetBinder::SettingAccessor::getNullableIntValue(m_ui.hddSizeSpinBox); + std::optional new_value = SettingWidgetBinder::SettingAccessor::getNullableIntValue(m_ui.hddSizeSpinBox); const int sizeGlobal = (u64)Host::GetBaseIntSettingValue("DEV9/Hdd", "HddSizeSectors", 0) * 512 / (1024 * 1024 * 1024); m_ui.hddSizeSlider->setValue(new_value.value_or(sizeGlobal)); @@ -797,7 +797,7 @@ void DEV9SettingsWidget::onHddSizeAccessorSpin() } else { - const int new_value = SettingWidgetBinder::SettingAccessor::getIntValue(m_ui.hddSizeSpinBox); + const int new_value = SettingWidgetBinder::SettingAccessor::getIntValue(m_ui.hddSizeSpinBox); m_ui.hddSizeSlider->setValue(new_value); m_dialog->setIntSettingValue("DEV9/Hdd", "HddSizeSectors", new_value * (1024 * 1024 * 1024 / 512)); } @@ -857,7 +857,7 @@ void DEV9SettingsWidget::showEvent(QShowEvent* event) const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast(Pcsx2Config::DEV9Options::NetApi::Unset)]).value(); //disconnect temporally to prevent saving a vaule already in the config file - disconnect(m_ui.ethDev, QOverload::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged); + disconnect(m_ui.ethDev, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged); for (int i = 0; m_api_namelist[i] != nullptr; i++) { if (value == m_api_valuelist[i]) @@ -866,7 +866,7 @@ void DEV9SettingsWidget::showEvent(QShowEvent* event) break; } } - connect(m_ui.ethDev, QOverload::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged); + connect(m_ui.ethDev, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged); } /* diff --git a/pcsx2-qt/Settings/DEV9SettingsWidget.h b/pcsx2-qt/Settings/DEV9SettingsWidget.h index eff77a08f04959..4b0823ab900158 100644 --- a/pcsx2-qt/Settings/DEV9SettingsWidget.h +++ b/pcsx2-qt/Settings/DEV9SettingsWidget.h @@ -37,7 +37,7 @@ private Q_SLOTS: void onEthDHCPInterceptChanged(int state); void onEthIPChanged(QLineEdit* sender, const char* section, const char* key); void onEthAutoChanged(QCheckBox* sender, int state, QLineEdit* input, const char* section, const char* key); - void onEthDNSModeChanged(QComboBox* sender, int index, QLineEdit* input, const char* section, const char* key); + void onEthDNSModeChanged(NoScrollQComboBox* sender, int index, QLineEdit* input, const char* section, const char* key); void onEthHostAdd(); void onEthHostDel(); void onEthHostExport(); diff --git a/pcsx2-qt/Settings/DEV9SettingsWidget.ui b/pcsx2-qt/Settings/DEV9SettingsWidget.ui index c1a46faea3b703..23014cac56e3fd 100644 --- a/pcsx2-qt/Settings/DEV9SettingsWidget.ui +++ b/pcsx2-qt/Settings/DEV9SettingsWidget.ui @@ -33,7 +33,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -256,7 +256,7 @@
- + @@ -294,7 +294,7 @@ - + 40 @@ -308,7 +308,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow 5 @@ -325,7 +325,7 @@ - + 40 @@ -386,6 +386,23 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+ + NoScrollQSlider + QSlider +
NoScrollQSlider.h
+
+ + NoScrollQSpinBox + QSpinBox +
NoScrollQSpinBox.h
+
+
diff --git a/pcsx2-qt/Settings/DebugSettingsWidget.ui b/pcsx2-qt/Settings/DebugSettingsWidget.ui index 0a17f7828ce6a3..00452c6dab8be3 100644 --- a/pcsx2-qt/Settings/DebugSettingsWidget.ui +++ b/pcsx2-qt/Settings/DebugSettingsWidget.ui @@ -92,7 +92,7 @@ - + 99999 @@ -106,7 +106,7 @@ - + 1 @@ -193,6 +193,13 @@ + + + NoScrollQSpinBox + QSpinBox +
NoScrollQSpinBox.h
+
+
diff --git a/pcsx2-qt/Settings/EmulationSettingsWidget.cpp b/pcsx2-qt/Settings/EmulationSettingsWidget.cpp index 3318ebe210fa42..95201512b1ef25 100644 --- a/pcsx2-qt/Settings/EmulationSettingsWidget.cpp +++ b/pcsx2-qt/Settings/EmulationSettingsWidget.cpp @@ -97,7 +97,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget m_ui.eeCycleRate->setCurrentIndex(cycle_rate.has_value() ? (std::clamp(cycle_rate.value(), MINIMUM_EE_CYCLE_RATE, MAXIMUM_EE_CYCLE_RATE) + (0 - MINIMUM_EE_CYCLE_RATE) + static_cast(m_dialog->isPerGameSettings())) : 0); - connect(m_ui.eeCycleRate, QOverload::of(&QComboBox::currentIndexChanged), this, [this](int index) { + connect(m_ui.eeCycleRate, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, [this](int index) { std::optional value; if (!m_dialog->isPerGameSettings() || index > 0) value = MINIMUM_EE_CYCLE_RATE + index - static_cast(m_dialog->isPerGameSettings()); @@ -160,7 +160,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget EmulationSettingsWidget::~EmulationSettingsWidget() = default; -void EmulationSettingsWidget::initializeSpeedCombo(QComboBox* cb, const char* section, const char* key, float default_value) +void EmulationSettingsWidget::initializeSpeedCombo(NoScrollQComboBox* cb, const char* section, const char* key, float default_value) { float value = Host::GetBaseFloatSettingValue(section, key, default_value); if (m_dialog->isPerGameSettings()) @@ -204,11 +204,11 @@ void EmulationSettingsWidget::initializeSpeedCombo(QComboBox* cb, const char* se cb->setCurrentIndex(custom_index); } - connect(cb, QOverload::of(&QComboBox::currentIndexChanged), this, + connect(cb, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, [this, cb, section, key](int index) { handleSpeedComboChange(cb, section, key); }); } -void EmulationSettingsWidget::handleSpeedComboChange(QComboBox* cb, const char* section, const char* key) +void EmulationSettingsWidget::handleSpeedComboChange(NoScrollQComboBox* cb, const char* section, const char* key) { const int custom_index = cb->count() - 1; const int current_index = cb->currentIndex(); diff --git a/pcsx2-qt/Settings/EmulationSettingsWidget.h b/pcsx2-qt/Settings/EmulationSettingsWidget.h index 95dae600ad6e47..b2873504b43c40 100644 --- a/pcsx2-qt/Settings/EmulationSettingsWidget.h +++ b/pcsx2-qt/Settings/EmulationSettingsWidget.h @@ -33,8 +33,8 @@ private Q_SLOTS: void onOptimalFramePacingChanged(); private: - void initializeSpeedCombo(QComboBox* cb, const char* section, const char* key, float default_value); - void handleSpeedComboChange(QComboBox* cb, const char* section, const char* key); + void initializeSpeedCombo(NoScrollQComboBox* cb, const char* section, const char* key, float default_value); + void handleSpeedComboChange(NoScrollQComboBox* cb, const char* section, const char* key); void updateOptimalFramePacing(); SettingsDialog* m_dialog; diff --git a/pcsx2-qt/Settings/EmulationSettingsWidget.ui b/pcsx2-qt/Settings/EmulationSettingsWidget.ui index 513e707485b743..43033ac9c64651 100644 --- a/pcsx2-qt/Settings/EmulationSettingsWidget.ui +++ b/pcsx2-qt/Settings/EmulationSettingsWidget.ui @@ -33,13 +33,13 @@ - + - + - + @@ -125,7 +125,7 @@ - + Disabled @@ -156,7 +156,7 @@ - + 50% (Underclock) @@ -202,7 +202,7 @@ - + Disabled @@ -250,7 +250,7 @@ - + frames @@ -305,6 +305,18 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+ + NoScrollQSpinBox + QSpinBox +
NoScrollQSpinBox.h
+
+
diff --git a/pcsx2-qt/Settings/GameSummaryWidget.cpp b/pcsx2-qt/Settings/GameSummaryWidget.cpp index b0b8a0ffd2c7a5..cb34b8ade2c05b 100644 --- a/pcsx2-qt/Settings/GameSummaryWidget.cpp +++ b/pcsx2-qt/Settings/GameSummaryWidget.cpp @@ -52,7 +52,7 @@ GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsDialo populateDetails(entry); populateDiscPath(entry); - connect(m_ui.inputProfile, &QComboBox::currentIndexChanged, this, &GameSummaryWidget::onInputProfileChanged); + connect(m_ui.inputProfile, &NoScrollQComboBox::currentIndexChanged, this, &GameSummaryWidget::onInputProfileChanged); } GameSummaryWidget::~GameSummaryWidget() = default; diff --git a/pcsx2-qt/Settings/GameSummaryWidget.ui b/pcsx2-qt/Settings/GameSummaryWidget.ui index 6536255cea6442..4dee90875510a6 100644 --- a/pcsx2-qt/Settings/GameSummaryWidget.ui +++ b/pcsx2-qt/Settings/GameSummaryWidget.ui @@ -90,7 +90,7 @@
- + false @@ -140,7 +140,7 @@ - + false @@ -313,7 +313,7 @@ - + false @@ -371,7 +371,7 @@ - + 0 @@ -428,6 +428,13 @@
+ + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+
diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index 183fa28a8dda4d..4c3fe4ea4dd6ad 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -122,7 +122,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cropBottom, "EmuCore/GS", "CropBottom", 0); connect( - m_ui.fullscreenModes, QOverload::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onFullscreenModeChanged); + m_ui.fullscreenModes, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onFullscreenModeChanged); ////////////////////////////////////////////////////////////////////////// // OSD Settings @@ -174,7 +174,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* sif, m_ui.blending, "EmuCore/GS", "accurate_blending_unit", static_cast(AccBlendLevel::Basic)); SettingWidgetBinder::BindWidgetToIntSetting( sif, m_ui.texturePreloading, "EmuCore/GS", "texture_preloading", static_cast(TexturePreloadingLevel::Off)); - connect(m_ui.trilinearFiltering, QOverload::of(&QComboBox::currentIndexChanged), this, + connect(m_ui.trilinearFiltering, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onTrilinearFilteringChanged); onTrilinearFilteringChanged(); @@ -203,10 +203,10 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* sif, m_ui.targetPartialInvalidation, "EmuCore/GS", "UserHacks_TargetPartialInvalidation", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.estimateTextureRegion, "EmuCore/GS", "UserHacks_EstimateTextureRegion", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.gpuPaletteConversion, "EmuCore/GS", "paltex", false); - connect(m_ui.cpuSpriteRenderBW, QOverload::of(&QComboBox::currentIndexChanged), this, + connect(m_ui.cpuSpriteRenderBW, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onCPUSpriteRenderBWChanged); connect( - m_ui.textureInsideRt, QOverload::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onTextureInsideRtChanged); + m_ui.textureInsideRt, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onTextureInsideRtChanged); connect(m_ui.gpuPaletteConversion, QOverload::of(&QCheckBox::stateChanged), this, &GraphicsSettingsWidget::onGpuPaletteConversionChanged); onCPUSpriteRenderBWChanged(); @@ -293,10 +293,10 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* m_ui.renderer->setCurrentIndex(0); } - connect(m_ui.renderer, QOverload::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onRendererChanged); + connect(m_ui.renderer, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onRendererChanged); connect(m_ui.enableHWFixes, &QCheckBox::stateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions); - connect(m_ui.textureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onTextureFilteringChange); - connect(m_ui.swTextureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onSWTextureFilteringChange); + connect(m_ui.textureFiltering, &NoScrollQComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onTextureFilteringChange); + connect(m_ui.swTextureFiltering, &NoScrollQComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onSWTextureFilteringChange); updateRendererDependentOptions(); #ifndef _WIN32 @@ -333,7 +333,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* Path::Combine(EmuFolders::DataRoot, "videos")); SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.captureContainer, "EmuCore/GS", "CaptureContainer"); - connect(m_ui.captureContainer, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onCaptureContainerChanged); + connect(m_ui.captureContainer, &NoScrollQComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onCaptureContainerChanged); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableVideoCapture, "EmuCore/GS", "EnableVideoCapture", true); SettingWidgetBinder::BindWidgetToIntSetting( diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index 990cfa78b275b0..acc900590adc64 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -40,7 +40,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -86,7 +86,7 @@ - + Fit to Window / Fullscreen @@ -117,7 +117,7 @@ - + Off (Default) @@ -148,7 +148,7 @@ - + Automatic (Default) @@ -209,7 +209,7 @@ - + None @@ -235,7 +235,7 @@ - + % @@ -264,7 +264,7 @@ - + px @@ -281,7 +281,7 @@ - + px @@ -298,7 +298,7 @@ - + px @@ -315,7 +315,7 @@ - + px @@ -399,7 +399,7 @@ - + Screen Resolution @@ -418,7 +418,7 @@ - + PNG @@ -439,7 +439,7 @@ - + % @@ -468,7 +468,7 @@ - + @@ -478,7 +478,7 @@ - + Automatic (Default) @@ -509,7 +509,7 @@ - + Nearest @@ -540,7 +540,7 @@ - + Automatic (Default) @@ -571,7 +571,7 @@ - + @@ -581,7 +581,7 @@ - + Off @@ -607,7 +607,7 @@ - + Minimum @@ -648,7 +648,7 @@ - + None @@ -706,7 +706,7 @@ - + true @@ -749,7 +749,7 @@ - + threads @@ -788,7 +788,7 @@ - + Automatic (Default) @@ -816,7 +816,7 @@ - + 0 (Disabled) @@ -875,7 +875,7 @@ - + Sprites Only @@ -903,7 +903,7 @@ - + 0 (Disabled) @@ -935,7 +935,7 @@ - + Disabled (Default) @@ -961,7 +961,7 @@ - + Disabled (Default) @@ -987,7 +987,7 @@ - + Disabled (Default) @@ -1015,14 +1015,14 @@ - + 10000 - + 10000 @@ -1119,7 +1119,7 @@ - + Off (Default) @@ -1150,7 +1150,7 @@ - + Off (Default) @@ -1185,7 +1185,7 @@ - + 1000 @@ -1199,7 +1199,7 @@ - + 1000 @@ -1380,7 +1380,7 @@ - + None (Default) @@ -1408,7 +1408,7 @@ - + % @@ -1448,7 +1448,7 @@ - + None (Default) @@ -1511,7 +1511,7 @@ - + 1 @@ -1528,7 +1528,7 @@ - + 1 @@ -1545,7 +1545,7 @@ - + 1 @@ -1593,7 +1593,7 @@ - + % @@ -1767,7 +1767,7 @@ - + @@ -1800,7 +1800,7 @@ - + @@ -1810,7 +1810,7 @@ - + kbps @@ -1868,7 +1868,7 @@ - + @@ -1878,7 +1878,7 @@ - + kbps @@ -1903,7 +1903,7 @@ - + 320 @@ -1926,7 +1926,7 @@ - + 240 @@ -2009,7 +2009,7 @@ - + Accurate (Recommended) @@ -2040,7 +2040,7 @@ - + Uncompressed @@ -2091,7 +2091,7 @@ - + Automatic (Default) @@ -2126,7 +2126,7 @@ - + Automatic (Default) @@ -2218,6 +2218,18 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+ + NoScrollQSpinBox + QSpinBox +
NoScrollQSpinBox.h
+
+
diff --git a/pcsx2-qt/Settings/InputBindingDialog.cpp b/pcsx2-qt/Settings/InputBindingDialog.cpp index 1b43a46f26447a..39f1d13ffcc143 100644 --- a/pcsx2-qt/Settings/InputBindingDialog.cpp +++ b/pcsx2-qt/Settings/InputBindingDialog.cpp @@ -58,8 +58,8 @@ InputBindingDialog::InputBindingDialog(SettingsInterface* sif, InputBindingInfo: ControllerSettingWidgetBinder::BindWidgetToInputProfileNormalized( sif, m_ui.deadzone, m_section_name, fmt::format("{}Deadzone", m_key_name), 100.0f, 0.0f); - connect(m_ui.sensitivity, &QSlider::valueChanged, this, &InputBindingDialog::onSensitivityChanged); - connect(m_ui.deadzone, &QSlider::valueChanged, this, &InputBindingDialog::onDeadzoneChanged); + connect(m_ui.sensitivity, &NoScrollQSlider::valueChanged, this, &InputBindingDialog::onSensitivityChanged); + connect(m_ui.deadzone, &NoScrollQSlider::valueChanged, this, &InputBindingDialog::onDeadzoneChanged); onSensitivityChanged(m_ui.sensitivity->value()); onDeadzoneChanged(m_ui.deadzone->value()); diff --git a/pcsx2-qt/Settings/InputBindingDialog.ui b/pcsx2-qt/Settings/InputBindingDialog.ui index d430cb387cee96..0b727075c5ecf4 100644 --- a/pcsx2-qt/Settings/InputBindingDialog.ui +++ b/pcsx2-qt/Settings/InputBindingDialog.ui @@ -53,7 +53,7 @@
- + 1 @@ -67,7 +67,7 @@ Qt::Horizontal
- QSlider::TicksBelow + NoScrollQSlider::TicksBelow
@@ -86,7 +86,7 @@
- + 0 @@ -100,7 +100,7 @@ Qt::Horizontal - QSlider::TicksBelow + NoScrollQSlider::TicksBelow 5 @@ -158,6 +158,13 @@
+ + + NoScrollQSlider + QSlider +
NoScrollQSlider.h
+
+
diff --git a/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp b/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp index 393914dd9abc12..aa1d73f6a12206 100644 --- a/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp +++ b/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp @@ -93,11 +93,11 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsDialog* dialog, QWidget SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.theme, "UI", "Theme", THEME_NAMES, THEME_VALUES, QtHost::GetDefaultThemeName(), "InterfaceSettingsWidget"); - connect(m_ui.theme, QOverload::of(&QComboBox::currentIndexChanged), [this]() { emit themeChanged(); }); + connect(m_ui.theme, QOverload::of(&NoScrollQComboBox::currentIndexChanged), [this]() { emit themeChanged(); }); populateLanguages(); SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.language, "UI", "Language", QtHost::GetDefaultLanguage()); - connect(m_ui.language, QOverload::of(&QComboBox::currentIndexChanged), [this]() { emit languageChanged(); }); + connect(m_ui.language, QOverload::of(&NoScrollQComboBox::currentIndexChanged), [this]() { emit languageChanged(); }); // Per-game settings is special, we don't want to bind it if we're editing per-game settings. m_ui.perGameSettings->setEnabled(!dialog->isPerGameSettings()); diff --git a/pcsx2-qt/Settings/InterfaceSettingsWidget.ui b/pcsx2-qt/Settings/InterfaceSettingsWidget.ui index be2e5d615dab2e..6ba064e4ba17f9 100644 --- a/pcsx2-qt/Settings/InterfaceSettingsWidget.ui +++ b/pcsx2-qt/Settings/InterfaceSettingsWidget.ui @@ -156,7 +156,7 @@
- + @@ -166,7 +166,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -250,6 +250,13 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+
diff --git a/pcsx2-qt/Settings/MemoryCardConvertDialog.cpp b/pcsx2-qt/Settings/MemoryCardConvertDialog.cpp index f8524cd88d54fd..46ad71ee4c7ba2 100644 --- a/pcsx2-qt/Settings/MemoryCardConvertDialog.cpp +++ b/pcsx2-qt/Settings/MemoryCardConvertDialog.cpp @@ -51,7 +51,7 @@ MemoryCardConvertDialog::MemoryCardConvertDialog(QWidget* parent, QString select m_ui.progressBar->setRange(0, 100); m_ui.progressBar->setValue(0); - connect(m_ui.conversionTypeSelect, &QComboBox::currentIndexChanged, this, [this]() + connect(m_ui.conversionTypeSelect, &NoScrollQComboBox::currentIndexChanged, this, [this]() { switch (m_srcCardInfo.type) { diff --git a/pcsx2-qt/Settings/MemoryCardConvertDialog.ui b/pcsx2-qt/Settings/MemoryCardConvertDialog.ui index 7fb3bf86e1ed9c..d8ad2c334a4e69 100644 --- a/pcsx2-qt/Settings/MemoryCardConvertDialog.ui +++ b/pcsx2-qt/Settings/MemoryCardConvertDialog.ui @@ -30,7 +30,7 @@ - + 8 MB File @@ -134,6 +134,13 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+
diff --git a/pcsx2-qt/Settings/USBDeviceWidget.ui b/pcsx2-qt/Settings/USBDeviceWidget.ui index 0efa61e430b42b..93983a0657cf60 100644 --- a/pcsx2-qt/Settings/USBDeviceWidget.ui +++ b/pcsx2-qt/Settings/USBDeviceWidget.ui @@ -35,10 +35,10 @@ - + - + @@ -135,6 +135,13 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+
diff --git a/pcsx2-qt/SetupWizardDialog.cpp b/pcsx2-qt/SetupWizardDialog.cpp index 7e08384cb395d6..6096eb5e946318 100644 --- a/pcsx2-qt/SetupWizardDialog.cpp +++ b/pcsx2-qt/SetupWizardDialog.cpp @@ -195,14 +195,14 @@ void SetupWizardDialog::setupLanguagePage() { SettingWidgetBinder::BindWidgetToEnumSetting(nullptr, m_ui.theme, "UI", "Theme", InterfaceSettingsWidget::THEME_NAMES, InterfaceSettingsWidget::THEME_VALUES, QtHost::GetDefaultThemeName(), "InterfaceSettingsWidget"); - connect(m_ui.theme, QOverload::of(&QComboBox::currentIndexChanged), this, &SetupWizardDialog::themeChanged); + connect(m_ui.theme, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &SetupWizardDialog::themeChanged); for (const std::pair& it : QtHost::GetAvailableLanguageList()) m_ui.language->addItem(it.first, it.second); SettingWidgetBinder::BindWidgetToStringSetting( nullptr, m_ui.language, "UI", "Language", QtHost::GetDefaultLanguage()); connect( - m_ui.language, QOverload::of(&QComboBox::currentIndexChanged), this, &SetupWizardDialog::languageChanged); + m_ui.language, QOverload::of(&NoScrollQComboBox::currentIndexChanged), this, &SetupWizardDialog::languageChanged); SettingWidgetBinder::BindWidgetToBoolSetting( nullptr, m_ui.autoUpdateEnabled, "AutoUpdater", "CheckAtStartup", true); @@ -400,7 +400,7 @@ void SetupWizardDialog::setupControllerPage() struct PadWidgets { - QComboBox* type_combo; + NoScrollQComboBox* type_combo; QLabel* mapping_result; QToolButton* mapping_button; }; diff --git a/pcsx2-qt/SetupWizardDialog.ui b/pcsx2-qt/SetupWizardDialog.ui index 773a25f9399ba3..aa97e413ec9ba2 100644 --- a/pcsx2-qt/SetupWizardDialog.ui +++ b/pcsx2-qt/SetupWizardDialog.ui @@ -159,7 +159,7 @@
- + 200 @@ -176,7 +176,7 @@ - + @@ -448,7 +448,7 @@ - + @@ -519,7 +519,7 @@ - + @@ -661,6 +661,13 @@ + + + NoScrollQComboBox + QComboBox +
NoScrollQComboBox.h
+
+
diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj index 24233b0a6b222f..3040f4592e527e 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj +++ b/pcsx2-qt/pcsx2-qt.vcxproj @@ -45,7 +45,7 @@ %(AdditionalIncludeDirectories);$(SolutionDir)3rdparty\sdl2\include;$(SolutionDir)3rdparty\sdl2\SDL\include %(AdditionalIncludeDirectories);$(SolutionDir)pcsx2 - %(AdditionalIncludeDirectories);$(ProjectDir)\Settings;$(ProjectDir)\GameList;$(ProjectDir)\Tools\InputRecording;$(ProjectDir)\Debugger;$(ProjectDir)\Debugger\Models + %(AdditionalIncludeDirectories);$(ProjectDir)\Settings;$(ProjectDir)\GameList;$(ProjectDir)\Tools\InputRecording;$(ProjectDir)\Debugger;$(ProjectDir)\Debugger\Models;$(ProjectDir)\CustomQtWidgets Use PrecompiledHeader.h LZMA_API_STATIC;BUILD_DX=1;ENABLE_RAINTEGRATION;ENABLE_ACHIEVEMENTS;ENABLE_DISCORD_PRESENCE;ENABLE_OPENGL;ENABLE_VULKAN;SDL_BUILD;%(PreprocessorDefinitions) @@ -144,6 +144,10 @@
+ + + + @@ -208,6 +212,10 @@ + + + + diff --git a/pcsx2-qt/pcsx2-qt.vcxproj.filters b/pcsx2-qt/pcsx2-qt.vcxproj.filters index 1e3e8af277592a..1db75e9bbbc6eb 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj.filters +++ b/pcsx2-qt/pcsx2-qt.vcxproj.filters @@ -28,6 +28,9 @@ {ad04f939-64a0-4039-97aa-a38b8aa46855} + + {cc3d587c-5b16-4434-b24d-a402fd84d352} + @@ -336,6 +339,18 @@ moc + + moc + + + moc + + + moc + + + moc + @@ -490,6 +505,18 @@ Settings + + CustomQtWidgets + + + CustomQtWidgets + + + CustomQtWidgets + + + CustomQtWidgets +