diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-09-13 13:50:25 -0400 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-09-13 13:52:09 -0400 |
commit | 3ae3706c847431089389721e2873bc9a0549d6d9 (patch) | |
tree | b9667e6a6187ea91ca2409b56ad4a85516dee244 /src/yuzu/configuration/shared_widget.h | |
parent | 2d2c176f030fd9c0559a2cf983296e16c4b835c7 (diff) |
shared_widget: Forward-port Citra changes
Seemed like a good time to move these over.
Also remove usage of std::sto{l,ll,ul,f,d}
Diffstat (limited to 'src/yuzu/configuration/shared_widget.h')
-rw-r--r-- | src/yuzu/configuration/shared_widget.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/yuzu/configuration/shared_widget.h b/src/yuzu/configuration/shared_widget.h index 5303dd898..86edaacc8 100644 --- a/src/yuzu/configuration/shared_widget.h +++ b/src/yuzu/configuration/shared_widget.h @@ -22,6 +22,7 @@ class QObject; class QPushButton; class QSlider; class QSpinBox; +class QDoubleSpinBox; class QRadioButton; namespace Settings { @@ -43,6 +44,9 @@ enum class RequestType { MaxEnum, }; +constexpr const float default_multiplier{1.f}; +constexpr const float default_float_multiplier{100.f}; + class Widget : public QWidget { Q_OBJECT @@ -89,6 +93,7 @@ public: QPushButton* restore_button{}; ///< Restore button for custom configurations QLineEdit* line_edit{}; ///< QLineEdit, used for LineEdit and HexEdit QSpinBox* spinbox{}; + QDoubleSpinBox* double_spinbox{}; QCheckBox* checkbox{}; QSlider* slider{}; QComboBox* combobox{}; @@ -126,6 +131,9 @@ private: const std::function<void()>& touch); QWidget* CreateSpinBox(const QString& suffix, std::function<std::string()>& serializer, std::function<void()>& restore_func, const std::function<void()>& touch); + QWidget* CreateDoubleSpinBox(const QString& suffix, std::function<std::string()>& serializer, + std::function<void()>& restore_func, + const std::function<void()>& touch); QWidget* parent; const TranslationMap& translations; |