From 2fcf2d47ede39411738339b30e8fab1ba18e2ef5 Mon Sep 17 00:00:00 2001 From: armored-dragon Date: Tue, 19 Nov 2024 20:10:53 -0600 Subject: [PATCH] Fixed stepsize. Removed floats. --- .../system/settings/qml_widgets/SettingNumber.qml | 12 ++++-------- scripts/system/settings/settings.qml | 5 ----- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/scripts/system/settings/qml_widgets/SettingNumber.qml b/scripts/system/settings/qml_widgets/SettingNumber.qml index 91b338576a..c0f0067b11 100644 --- a/scripts/system/settings/qml_widgets/SettingNumber.qml +++ b/scripts/system/settings/qml_widgets/SettingNumber.qml @@ -3,7 +3,6 @@ import QtQuick.Controls 2.5 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 -// TODO: Non int numbers // TODO: Numpad Enter key support Item { @@ -11,12 +10,10 @@ Item { property string settingText: ""; property var settingValue: 0; - // property bool isInt: true; - property int decimalPlaces: 0; property real minValue: 0; property real maxValue: 9; property string suffixText: ""; - // property real stepSize: 1; + property real stepSize: 1; signal valueChanged(int value); @@ -46,10 +43,9 @@ Item { SpinBox { id: spinbox; value: settingValue; - // decimals: 2; from: minValue; to: maxValue; - // stepSize: stepSize; + stepSize: stepSize; Layout.alignment: Qt.AlignRight; implicitWidth: 200; implicitHeight: parent.height; @@ -107,7 +103,7 @@ Item { } onClicked: { - spinbox.value += 1; + spinbox.value += stepSize; valueChanged(spinbox.value); } } @@ -133,7 +129,7 @@ Item { } onClicked: { - spinbox.value -= 1; + spinbox.value -= stepSize; valueChanged(spinbox.value); } } diff --git a/scripts/system/settings/settings.qml b/scripts/system/settings/settings.qml index 588bd74f6c..c31b4ac415 100644 --- a/scripts/system/settings/settings.qml +++ b/scripts/system/settings/settings.qml @@ -175,7 +175,6 @@ Rectangle { SettingNumber { settingText: "Focus Active"; minValue: 1; - decimalPlaces: 2; maxValue: 9999; suffixText: "fps"; settingValue: Performance.getCustomRefreshRate(0) @@ -188,7 +187,6 @@ Rectangle { SettingNumber { settingText: "Focus Inactive"; minValue: 1; - decimalPlaces: 2; maxValue: 9999; suffixText: "fps"; settingValue: Performance.getCustomRefreshRate(1) @@ -201,7 +199,6 @@ Rectangle { SettingNumber { settingText: "Minimized"; minValue: 1; - decimalPlaces: 2; maxValue: 9999; suffixText: "fps"; settingValue: Performance.getCustomRefreshRate(3) @@ -214,7 +211,6 @@ Rectangle { SettingNumber { settingText: "Startup"; minValue: 1; - decimalPlaces: 2; maxValue: 9999; suffixText: "fps"; settingValue: Performance.getCustomRefreshRate(4) @@ -227,7 +223,6 @@ Rectangle { SettingNumber { settingText: "Shutdown"; minValue: 1; - decimalPlaces: 2; maxValue: 9999; suffixText: "fps"; settingValue: Performance.getCustomRefreshRate(5)