Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/package/contents/ui/ToolsResponsive.qml
Show All 24 Lines | |||||
25 | 25 | | |||
26 | import org.kde.kirigami 2.8 as Kirigami | 26 | import org.kde.kirigami 2.8 as Kirigami | ||
27 | 27 | | |||
28 | Rectangle { | 28 | Rectangle { | ||
29 | id: root | 29 | id: root | ||
30 | width: parent.width | 30 | width: parent.width | ||
31 | color: Kirigami.Theme.backgroundColor | 31 | color: Kirigami.Theme.backgroundColor | ||
32 | 32 | | |||
33 | Kirigami.Theme.textColor: cuttlefish.textcolor | | |||
34 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | | |||
35 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | | |||
36 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | | |||
37 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | | |||
38 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | | |||
39 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | | |||
40 | | ||||
41 | property alias currentIndex: colorcombo.currentIndex | 33 | property alias currentIndex: colorcombo.currentIndex | ||
42 | property alias value: sizeslider.value | 34 | property alias value: sizeslider.value | ||
43 | 35 | | |||
44 | signal colorschemeChanged(int index) | 36 | signal colorschemeChanged(int index) | ||
45 | signal sliderValueChanged(int val) | 37 | signal sliderValueChanged(int val) | ||
46 | 38 | | |||
47 | Kirigami.Separator { | 39 | Kirigami.Separator { | ||
48 | height: 1 | 40 | height: 1 | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 82 | QQC2.Label { | |||
91 | visible: !cuttlefish.widescreen | 83 | visible: !cuttlefish.widescreen | ||
92 | id: pixelSizeInput | 84 | id: pixelSizeInput | ||
93 | 85 | | |||
94 | Layout.preferredWidth: units.gridUnit * 1 | 86 | Layout.preferredWidth: units.gridUnit * 1 | ||
95 | } | 87 | } | ||
96 | QQC2.ComboBox { | 88 | QQC2.ComboBox { | ||
97 | id: colorcombo | 89 | id: colorcombo | ||
98 | visible: !cuttlefish.widescreen | 90 | visible: !cuttlefish.widescreen | ||
99 | model: ["System Color Scheme", "Breeze (Normal)", "Breeze Dark"] | 91 | model: colorSchemes.colorSchemes | ||
100 | delegate: QQC2.ItemDelegate { | 92 | delegate: QQC2.ItemDelegate { | ||
101 | text: i18n(modelData) | 93 | Kirigami.Theme.colorSet: Kirigami.Theme.View | ||
102 | width: parent.width | 94 | width: parent.width | ||
95 | highlighted: colorcombo.highlightedIndex == index | ||||
96 | contentItem: RowLayout { | ||||
97 | Kirigami.Icon { | ||||
98 | source: model.decoration | ||||
99 | Layout.preferredHeight: Kirigami.Units.iconSizes.small | ||||
100 | Layout.preferredWidth: Kirigami.Units.iconSizes.small | ||||
101 | } | ||||
102 | QQC2.Label { | ||||
103 | text: model.display | ||||
104 | color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor | ||||
105 | Layout.fillWidth: true | ||||
106 | } | ||||
107 | } | ||||
103 | } | 108 | } | ||
109 | textRole: "display" | ||||
104 | onActivated: (index) => { | 110 | onActivated: (index) => { | ||
105 | root.colorschemeChanged(index) | 111 | root.colorschemeChanged(index) | ||
112 | colorSchemes.activateColorScheme(currentText) | ||||
106 | } | 113 | } | ||
107 | popup.modal: false | 114 | popup.modal: false | ||
108 | } | 115 | } | ||
109 | Item { | 116 | Item { | ||
110 | width: Kirigami.Units.largeSpacing * 3 | 117 | width: Kirigami.Units.largeSpacing * 3 | ||
111 | } | 118 | } | ||
112 | } | 119 | } | ||
113 | } | 120 | } | ||
114 | No newline at end of file | |