import QtQuick import QtQuick.Layouts import "../../services" import "../../theme" import "../../components" SettingRow { id: root property string label property real from: 0 property real to: 1 property real step: 0.01 property string unit title: label GlassSlider { Layout.preferredWidth: 240 from: root.from to: root.to stepSize: root.step value: Number(ConfigService.value(root.setting)) onMoved: ConfigService.setValue(root.setting, Number((Math.round(value / root.step) * root.step).toFixed(6))) } Text { text: Number(ConfigService.value(root.setting)).toFixed(root.step < 0.01 ? 3 : root.step < 1 ? 2 : 0) + root.unit color: Theme.textSecondary font.pixelSize: 12 font.features: { "tnum": 1 } horizontalAlignment: Text.AlignRight Layout.preferredWidth: 52 } }