summaryrefslogtreecommitdiffstats
path: root/views/calendar/qml/View.qml
diff options
context:
space:
mode:
Diffstat (limited to 'views/calendar/qml/View.qml')
-rw-r--r--views/calendar/qml/View.qml80
1 files changed, 45 insertions, 35 deletions
diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml
index 5820ab87..829d04cc 100644
--- a/views/calendar/qml/View.qml
+++ b/views/calendar/qml/View.qml
@@ -136,46 +136,56 @@ RowLayout {
136 type: "calendar" 136 type: "calendar"
137 roles: ["name", "color"] 137 roles: ["name", "color"]
138 } 138 }
139 delegate: RowLayout { 139 delegate: ItemDelegate {
140 id: delegate
140 width: listView.availableWidth 141 width: listView.availableWidth
141 height: Kube.Units.gridUnit 142 height: Kube.Units.gridUnit
142 spacing: Kube.Units.smallSpacing 143 RowLayout {
143 Kube.CheckBox { 144 anchors.fill: parent
144 id: checkBox 145 spacing: Kube.Units.smallSpacing
145 opacity: 0.9 146 Kube.CheckBox {
146 checked: !model.checked 147 id: checkBox
147 onToggled: model.checked = !checked 148 opacity: 0.9
148 149 checked: !model.checked
149 indicator: Rectangle { 150 onToggled: model.checked = !checked
150 width: Kube.Units.gridUnit 151
151 height: Kube.Units.gridUnit 152 indicator: Rectangle {
152
153 color: model.color
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 153 width: Kube.Units.gridUnit
167 visible: checkBox.checked 154 height: Kube.Units.gridUnit
168 iconName: Kube.Icons.checkbox_inverted 155
156 color: model.color
157
158 Rectangle {
159 id: highlight
160 anchors.fill: parent
161 visible: checkBox.hovered || checkBox.visualFocus
162 color: Kube.Colors.highlightColor
163 opacity: 0.4
164 }
165
166 Kube.Icon {
167 anchors.centerIn: parent
168 height: Kube.Units.gridUnit
169 width: Kube.Units.gridUnit
170 visible: checkBox.checked
171 iconName: Kube.Icons.checkbox_inverted
172 }
169 } 173 }
170 }
171 174
172 } 175 }
173 Kube.Label { 176 Kube.Label {
174 Layout.fillWidth: true 177 id: label
175 text: model.name 178 Layout.fillWidth: true
176 color: Kube.Colors.highlightedTextColor 179 text: model.name
177 elide: Text.ElideLeft 180 color: Kube.Colors.highlightedTextColor
178 clip: true 181 elide: Text.ElideLeft
182 clip: true
183 }
184 ToolTip {
185 id: toolTipItem
186 visible: delegate.hovered && label.truncated
187 text: label.text
188 }
179 } 189 }
180 } 190 }
181 } 191 }