Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/package/contents/ui/Tools.qml
Show All 25 Lines | |||||
26 | 26 | | |||
27 | import org.kde.kirigami 2.8 as Kirigami | 27 | import org.kde.kirigami 2.8 as Kirigami | ||
28 | 28 | | |||
29 | Rectangle { | 29 | Rectangle { | ||
30 | id: root | 30 | id: root | ||
31 | width: parent.width | 31 | width: parent.width | ||
32 | color: Kirigami.Theme.backgroundColor | 32 | color: Kirigami.Theme.backgroundColor | ||
33 | signal colorschemeChanged(int index) | 33 | signal colorschemeChanged(int index) | ||
34 | signal sliderValueChanged(int val) | ||||
35 | | ||||
34 | property alias slider: sizeslider | 36 | property alias slider: sizeslider | ||
35 | property alias currentIndex: colorcombo.currentIndex | 37 | property alias currentIndex: colorcombo.currentIndex | ||
38 | property alias value: sizeslider.value | ||||
36 | 39 | | |||
37 | Kirigami.Theme.textColor: cuttlefish.textcolor | 40 | Kirigami.Theme.textColor: cuttlefish.textcolor | ||
38 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | 41 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | ||
39 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | 42 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | ||
40 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | 43 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | ||
41 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | 44 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | ||
42 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | 45 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | ||
43 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | 46 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 89 | QQC2.Slider { | |||
91 | to: 5.0 | 94 | to: 5.0 | ||
92 | stepSize: 1.0 | 95 | stepSize: 1.0 | ||
93 | snapMode: QQC2.Slider.SnapAlways | 96 | snapMode: QQC2.Slider.SnapAlways | ||
94 | value: 4.0 | 97 | value: 4.0 | ||
95 | 98 | | |||
96 | onValueChanged: { | 99 | onValueChanged: { | ||
97 | sizetimer.restart() | 100 | sizetimer.restart() | ||
98 | pixelSizeInput.text = indexToSize(sizeslider.value) | 101 | pixelSizeInput.text = indexToSize(sizeslider.value) | ||
102 | root.sliderValueChanged(sizeslider.value) | ||||
99 | } | 103 | } | ||
100 | 104 | | |||
101 | Timer { | 105 | Timer { | ||
102 | id: sizetimer | 106 | id: sizetimer | ||
103 | running: false | 107 | running: false | ||
104 | repeat: false | 108 | repeat: false | ||
105 | interval: 200 | 109 | interval: 200 | ||
106 | onTriggered: iconSize = indexToSize(sizeslider.value) | 110 | onTriggered: iconSize = indexToSize(sizeslider.value) | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |