Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/package/contents/ui/ToolsResponsive.qml
Show All 33 Lines | 28 | Rectangle { | |||
---|---|---|---|---|---|
34 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | 34 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | ||
35 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | 35 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | ||
36 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | 36 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | ||
37 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | 37 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | ||
38 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | 38 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | ||
39 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | 39 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | ||
40 | 40 | | |||
41 | property alias currentIndex: colorcombo.currentIndex | 41 | property alias currentIndex: colorcombo.currentIndex | ||
42 | property alias value: sizeslider.value | ||||
43 | | ||||
42 | signal colorschemeChanged(int index) | 44 | signal colorschemeChanged(int index) | ||
45 | signal sliderValueChanged(int val) | ||||
46 | | ||||
43 | Kirigami.Separator { | 47 | Kirigami.Separator { | ||
44 | height: 1 | 48 | height: 1 | ||
45 | anchors { | 49 | anchors { | ||
46 | left: parent.left | 50 | left: parent.left | ||
47 | right: parent.right | 51 | right: parent.right | ||
48 | top: parent.top | 52 | top: parent.top | ||
49 | } | 53 | } | ||
50 | } | 54 | } | ||
51 | RowLayout { | 55 | RowLayout { | ||
52 | anchors.fill: parent | 56 | anchors.fill: parent | ||
53 | anchors.leftMargin: Kirigami.Units.smallSpacing | 57 | anchors.leftMargin: Kirigami.Units.smallSpacing | ||
54 | anchors.rightMargin: Kirigami.Units.smallSpacing | 58 | anchors.rightMargin: Kirigami.Units.smallSpacing | ||
55 | anchors.verticalCenter: parent.verticalCenter | 59 | anchors.verticalCenter: parent.verticalCenter | ||
56 | spacing: Kirigami.Units.largeSpacing | 60 | spacing: Kirigami.Units.largeSpacing | ||
57 | QQC2.Slider { | 61 | QQC2.Slider { | ||
58 | visible: !cuttlefish.widescreen | 62 | visible: !cuttlefish.widescreen | ||
59 | id: sizeslider | 63 | id: sizeslider | ||
60 | Layout.fillWidth: true | 64 | Layout.fillWidth: true | ||
61 | 65 | | |||
62 | to: 5.0 | 66 | to: 6.0 | ||
63 | stepSize: 1.0 | 67 | stepSize: 1.0 | ||
64 | snapMode: QQC2.Slider.SnapAlways | 68 | snapMode: QQC2.Slider.SnapAlways | ||
65 | value: 4.0 | 69 | value: 4.0 | ||
66 | 70 | | |||
67 | onValueChanged: { | 71 | onValueChanged: { | ||
68 | sizetimer.restart() | 72 | sizetimer.restart() | ||
69 | pixelSizeInput.text = indexToSize(sizeslider.value) | 73 | pixelSizeInput.text = indexToSize(sizeslider.value) | ||
74 | root.sliderValueChanged(sizeslider.value) | ||||
70 | } | 75 | } | ||
71 | 76 | | |||
72 | Timer { | 77 | Timer { | ||
73 | id: sizetimer | 78 | id: sizetimer | ||
74 | running: false | 79 | running: false | ||
75 | repeat: false | 80 | repeat: false | ||
76 | interval: 200 | 81 | interval: 200 | ||
77 | onTriggered: iconSize = indexToSize(sizeslider.value) | 82 | onTriggered: iconSize = indexToSize(sizeslider.value) | ||
Show All 32 Lines |