diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-21 05:48:53 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-21 05:48:53 +0200 |
commit | cd5fc3ea02bea45dc81dd33d555cf9d1265f9d3a (patch) | |
tree | 35ae52c9f34e60f1a8ef44a3a85e4272b03c20ca | |
parent | 4ec6700476de731ca1f3ccd40615d73481ac253b (diff) | |
download | kube-cd5fc3ea02bea45dc81dd33d555cf9d1265f9d3a.tar.gz kube-cd5fc3ea02bea45dc81dd33d555cf9d1265f9d3a.zip |
Editor focus
-rw-r--r-- | components/kube/contents/ui/ComposerView.qml | 3 | ||||
-rw-r--r-- | framework/qml/TextEditor.qml | 26 |
2 files changed, 17 insertions, 12 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml index a8730328..35ae5255 100644 --- a/components/kube/contents/ui/ComposerView.qml +++ b/components/kube/contents/ui/ComposerView.qml | |||
@@ -241,6 +241,7 @@ Kube.View { | |||
241 | 241 | ||
242 | Kube.IconButton { | 242 | Kube.IconButton { |
243 | id: deleteButton | 243 | id: deleteButton |
244 | activeFocusOnTab: true | ||
244 | iconName: Kube.Icons.moveToTrash | 245 | iconName: Kube.Icons.moveToTrash |
245 | visible: enabled | 246 | visible: enabled |
246 | enabled: !!model.mail | 247 | enabled: !!model.mail |
@@ -276,6 +277,7 @@ Kube.View { | |||
276 | Kube.TextField { | 277 | Kube.TextField { |
277 | id: subject | 278 | id: subject |
278 | Layout.fillWidth: true | 279 | Layout.fillWidth: true |
280 | activeFocusOnTab: true | ||
279 | 281 | ||
280 | placeholderText: "Enter Subject..." | 282 | placeholderText: "Enter Subject..." |
281 | text: composerController.subject | 283 | text: composerController.subject |
@@ -329,6 +331,7 @@ Kube.View { | |||
329 | Kube.TextEditor { | 331 | Kube.TextEditor { |
330 | Layout.fillWidth: true | 332 | Layout.fillWidth: true |
331 | Layout.fillHeight: true | 333 | Layout.fillHeight: true |
334 | activeFocusOnTab: true | ||
332 | onActiveFocusChanged: closeFirstSplitIfNecessary() | 335 | onActiveFocusChanged: closeFirstSplitIfNecessary() |
333 | text: composerController.body | 336 | text: composerController.body |
334 | onTextChanged: composerController.body = text; | 337 | onTextChanged: composerController.body = text; |
diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml index d80bebb9..97aa56d2 100644 --- a/framework/qml/TextEditor.qml +++ b/framework/qml/TextEditor.qml | |||
@@ -22,21 +22,23 @@ import QtQuick.Controls 2.2 | |||
22 | 22 | ||
23 | import org.kube.framework 1.0 as Kube | 23 | import org.kube.framework 1.0 as Kube |
24 | 24 | ||
25 | Kube.ScrollHelper { | 25 | FocusScope { |
26 | id: scrollHelper | ||
27 | property alias text: edit.text | 26 | property alias text: edit.text |
28 | flickable: root | 27 | Kube.ScrollHelper { |
29 | Flickable { | ||
30 | id: root | ||
31 | anchors.fill: parent | 28 | anchors.fill: parent |
32 | ScrollBar.vertical: ScrollBar {} | 29 | flickable: flickableItem |
33 | 30 | Flickable { | |
34 | Kube.TextArea { | 31 | id: flickableItem |
35 | id: edit | ||
36 | anchors.fill: parent | 32 | anchors.fill: parent |
37 | selectByMouse: true | 33 | ScrollBar.vertical: ScrollBar {} |
38 | wrapMode: TextEdit.Wrap | 34 | |
35 | Kube.TextArea { | ||
36 | id: edit | ||
37 | anchors.fill: parent | ||
38 | selectByMouse: true | ||
39 | wrapMode: TextEdit.Wrap | ||
40 | } | ||
41 | TextArea.flickable: edit | ||
39 | } | 42 | } |
40 | TextArea.flickable: edit | ||
41 | } | 43 | } |
42 | } | 44 | } |