mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-20 20:09:14 +00:00
Fix: update sliders when profile changes.
This commit is contained in:
parent
30074f3814
commit
d6b644cd7d
@ -23,12 +23,12 @@ import QtQuick.Controls 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
RowLayout {
|
||||
property string name
|
||||
property alias name: check.text
|
||||
property double value: (check.checked) ? _value : 0.0
|
||||
property double _value: 0.0
|
||||
property double min_value: 0.0
|
||||
property double max_value: 1.0
|
||||
property double stepSize: 0.01
|
||||
property alias _value: slider.value
|
||||
property alias min_value: slider.minimumValue
|
||||
property alias max_value: slider.maximumValue
|
||||
property alias stepSize: slider.stepSize
|
||||
|
||||
id: setting_component
|
||||
anchors.left: parent.left
|
||||
@ -38,21 +38,13 @@ RowLayout {
|
||||
CheckBox{
|
||||
id: check
|
||||
implicitWidth: 150
|
||||
|
||||
text: name
|
||||
Component.onCompleted: checked = (_value !== 0);
|
||||
}
|
||||
Slider{
|
||||
id: slider
|
||||
stepSize: parent.stepSize
|
||||
minimumValue: min_value
|
||||
maximumValue: max_value
|
||||
onValueChanged: setting_component._value = slider.value;
|
||||
Layout.fillWidth: true
|
||||
enabled: check.checked
|
||||
value: setting_component._value
|
||||
|
||||
Component.onCompleted: slider.value = setting_component._value
|
||||
}
|
||||
Text{
|
||||
id: textfield
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.0.1, 2014-06-26T21:03:57. -->
|
||||
<!-- Written by QtCreator 3.0.1, 2014-06-27T16:14:00. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
|
Loading…
x
Reference in New Issue
Block a user