diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-26 18:04:42 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-26 18:04:42 +0200 |
commit | bd6939e3b37ab7e8a1d72ac79fdaee525419964d (patch) | |
tree | e2ec9dcc55d840d6c48a7c7f510737976c25984c /framework | |
parent | 9a4532647cd470a059a662f30471da307ef04ed6 (diff) | |
download | kube-bd6939e3b37ab7e8a1d72ac79fdaee525419964d.tar.gz kube-bd6939e3b37ab7e8a1d72ac79fdaee525419964d.zip |
Replace icons with hotkeys during keyboard focus.
The icons are distracting and not particularly useful when going through
the list. And the hotkeys allow for keyboard interaction anyways.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/qml/MailListView.qml | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 5d26465e..631107e6 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml | |||
@@ -87,6 +87,10 @@ FocusScope { | |||
87 | Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": root.currentMail}) | 87 | Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": root.currentMail}) |
88 | } else if (event.text == "r") { | 88 | } else if (event.text == "r") { |
89 | Kube.Fabric.postMessage(Kube.Messages.reply, {"mail": root.currentMail}) | 89 | Kube.Fabric.postMessage(Kube.Messages.reply, {"mail": root.currentMail}) |
90 | } else if (event.text == "i") { | ||
91 | Kube.Fabric.postMessage(Kube.Messages.setImportant, {"mail": root.currentMail, "important": !currentItem.currentData.important}) | ||
92 | } else if (event.text == "u") { | ||
93 | Kube.Fabric.postMessage(Kube.Messages.markAsUnread, {"mail": root.currentMail}) | ||
90 | } | 94 | } |
91 | } | 95 | } |
92 | 96 | ||
@@ -114,6 +118,7 @@ FocusScope { | |||
114 | id: delegateRoot | 118 | id: delegateRoot |
115 | //Required for D&D | 119 | //Required for D&D |
116 | property var mail: model.mail | 120 | property var mail: model.mail |
121 | property bool buttonsVisible: delegateRoot.hovered | ||
117 | 122 | ||
118 | width: listView.availableWidth | 123 | width: listView.availableWidth |
119 | height: Kube.Units.gridUnit * 5 | 124 | height: Kube.Units.gridUnit * 5 |
@@ -199,7 +204,7 @@ FocusScope { | |||
199 | right: parent.right | 204 | right: parent.right |
200 | bottom: parent.bottom | 205 | bottom: parent.bottom |
201 | } | 206 | } |
202 | visible: !delegateRoot.focused | 207 | visible: !delegateRoot.buttonsVisible |
203 | text: Qt.formatDateTime(model.date, "dd MMM yyyy") | 208 | text: Qt.formatDateTime(model.date, "dd MMM yyyy") |
204 | font.italic: true | 209 | font.italic: true |
205 | color: delegateRoot.disabledTextColor | 210 | color: delegateRoot.disabledTextColor |
@@ -214,20 +219,20 @@ FocusScope { | |||
214 | } | 219 | } |
215 | text: model.threadSize | 220 | text: model.threadSize |
216 | color: content.unreadColor | 221 | color: content.unreadColor |
217 | visible: model.threadSize > 1 && !delegateRoot.focused | 222 | visible: model.threadSize > 1 && !delegateRoot.buttonsVisible |
218 | 223 | ||
219 | } | 224 | } |
220 | } | 225 | } |
221 | 226 | ||
222 | Kube.Icon { | 227 | Kube.Icon { |
223 | anchors { | 228 | anchors { |
224 | right: parent.right | 229 | right: parent.right |
225 | verticalCenter: parent.verticalCenter | 230 | verticalCenter: parent.verticalCenter |
226 | margins: Kube.Units.smallSpacing | 231 | margins: Kube.Units.smallSpacing |
227 | } | 232 | } |
228 | 233 | ||
229 | visible: model.important && !delegateRoot.focused && !mouseArea.drag.active | 234 | visible: model.important && !delegateRoot.buttonsVisible && !mouseArea.drag.active |
230 | iconName: Kube.Icons.isImportant | 235 | iconName: Kube.Icons.isImportant |
231 | } | 236 | } |
232 | 237 | ||
233 | Column { | 238 | Column { |
@@ -239,7 +244,7 @@ FocusScope { | |||
239 | verticalCenter: parent.verticalCenter | 244 | verticalCenter: parent.verticalCenter |
240 | } | 245 | } |
241 | 246 | ||
242 | visible: delegateRoot.focused && !mouseArea.drag.active | 247 | visible: delegateRoot.buttonsVisible && !mouseArea.drag.active |
243 | opacity: 0.7 | 248 | opacity: 0.7 |
244 | 249 | ||
245 | Kube.IconButton { | 250 | Kube.IconButton { |