summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/qml/Icons.qml1
-rw-r--r--views/calendar/qml/View.qml56
2 files changed, 36 insertions, 21 deletions
diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml
index df3baead..f40ff9b0 100644
--- a/framework/qml/Icons.qml
+++ b/framework/qml/Icons.qml
@@ -62,6 +62,7 @@ Item {
62 property string goDown_inverted: "go-down-inverted" 62 property string goDown_inverted: "go-down-inverted"
63 property string goUp: "go-up" 63 property string goUp: "go-up"
64 property string checkbox: "checkbox" 64 property string checkbox: "checkbox"
65 property string checkbox_inverted: "checkbox-inverted"
65 property string password_show: "password-show-on" 66 property string password_show: "password-show-on"
66 property string password_hide: "password-show-off" 67 property string password_hide: "password-show-off"
67 property string secure: "document-encrypt" 68 property string secure: "document-encrypt"
diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml
index 30239378..5820ab87 100644
--- a/views/calendar/qml/View.qml
+++ b/views/calendar/qml/View.qml
@@ -136,32 +136,46 @@ RowLayout {
136 type: "calendar" 136 type: "calendar"
137 roles: ["name", "color"] 137 roles: ["name", "color"]
138 } 138 }
139 delegate: Item { 139 delegate: RowLayout {
140 width: listView.availableWidth 140 width: listView.availableWidth
141 height: Kube.Units.gridUnit 141 height: Kube.Units.gridUnit
142 RowLayout { 142 spacing: Kube.Units.smallSpacing
143 anchors.fill: parent 143 Kube.CheckBox {
144 spacing: Kube.Units.smallSpacing 144 id: checkBox
145 Kube.CheckBox { 145 opacity: 0.9
146 opacity: 0.9 146 checked: !model.checked
147 checked: !model.checked 147 onToggled: model.checked = !checked
148 onToggled: model.checked = !checked 148
149 } 149 indicator: Rectangle {
150 Kube.Label {
151 Layout.fillWidth: true
152 text: model.name
153 color: Kube.Colors.highlightedTextColor
154 elide: Text.ElideLeft
155 clip: true
156 }
157 Rectangle {
158 anchors.verticalCenter: parent.verticalCenter
159 width: Kube.Units.gridUnit 150 width: Kube.Units.gridUnit
160 height: width 151 height: Kube.Units.gridUnit
161 radius: width / 2 152
162 color: model.color 153 color: model.color
163 opacity: 0.9 154
155 Rectangle {
156 id: highlight
157 anchors.fill: parent
158 visible: checkBox.hovered || checkBox.visualFocus
159 color: Kube.Colors.highlightColor
160 opacity: 0.4
161 }
162
163 Kube.Icon {
164 anchors.centerIn: parent
165 height: Kube.Units.gridUnit
166 width: Kube.Units.gridUnit
167 visible: checkBox.checked
168 iconName: Kube.Icons.checkbox_inverted
169 }
164 } 170 }
171
172 }
173 Kube.Label {
174 Layout.fillWidth: true
175 text: model.name
176 color: Kube.Colors.highlightedTextColor
177 elide: Text.ElideLeft
178 clip: true
165 } 179 }
166 } 180 }
167 } 181 }