diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-07 09:54:17 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-07 09:54:17 +0200 |
commit | 71b8f65dbb0d50e6545242f65a568a22c85f0fae (patch) | |
tree | d3d32f5a45e953144fe9f36ace8884bc14245194 | |
parent | 027650c76012f932849071465bf8762d731e99c9 (diff) | |
download | kube-71b8f65dbb0d50e6545242f65a568a22c85f0fae.tar.gz kube-71b8f65dbb0d50e6545242f65a568a22c85f0fae.zip |
Consistently give focus to popups
In all cases we want the popup to receive keyboard focus when
it's open, as all our popups are basically modal. We also want the popup
to normally close when clicking somewhere else, including the parent
button. The one exception is the composer where we disable the close on
click outside because that would risk loosing a written mail on an
accidental click.
-rw-r--r-- | components/kube/contents/ui/Kube.qml | 3 | ||||
-rw-r--r-- | framework/qml/AccountSwitcher.qml | 4 | ||||
-rw-r--r-- | framework/qml/FocusComposer.qml | 3 | ||||
-rw-r--r-- | framework/qml/Outbox.qml | 2 | ||||
-rw-r--r-- | framework/qml/Popup.qml | 2 |
5 files changed, 3 insertions, 11 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index dedd13f1..41e970c6 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml | |||
@@ -420,9 +420,6 @@ Controls2.ApplicationWindow { | |||
420 | x: app.width * 0.2 | 420 | x: app.width * 0.2 |
421 | y: app.height * 0.2 | 421 | y: app.height * 0.2 |
422 | 422 | ||
423 | modal: true | ||
424 | focus: true | ||
425 | |||
426 | RowLayout { | 423 | RowLayout { |
427 | anchors.centerIn: parent | 424 | anchors.centerIn: parent |
428 | width: parent.width | 425 | width: parent.width |
diff --git a/framework/qml/AccountSwitcher.qml b/framework/qml/AccountSwitcher.qml index 2355d21c..b08983b3 100644 --- a/framework/qml/AccountSwitcher.qml +++ b/framework/qml/AccountSwitcher.qml | |||
@@ -56,10 +56,6 @@ Controls.ToolButton { | |||
56 | 56 | ||
57 | y: accountSwitcher.y - height | 57 | y: accountSwitcher.y - height |
58 | 58 | ||
59 | modal: true | ||
60 | focus: true | ||
61 | closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent | ||
62 | |||
63 | Item { | 59 | Item { |
64 | id: buttons | 60 | id: buttons |
65 | anchors { | 61 | anchors { |
diff --git a/framework/qml/FocusComposer.qml b/framework/qml/FocusComposer.qml index 5900b809..08eafe36 100644 --- a/framework/qml/FocusComposer.qml +++ b/framework/qml/FocusComposer.qml | |||
@@ -46,8 +46,7 @@ Kube.Popup { | |||
46 | } | 46 | } |
47 | //END functions | 47 | //END functions |
48 | 48 | ||
49 | modal: true | 49 | //Don't close the composer due to an accidental click outside |
50 | focus: true | ||
51 | closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent | 50 | closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent |
52 | 51 | ||
53 | Item { | 52 | Item { |
diff --git a/framework/qml/Outbox.qml b/framework/qml/Outbox.qml index ad398337..e9e3c677 100644 --- a/framework/qml/Outbox.qml +++ b/framework/qml/Outbox.qml | |||
@@ -82,8 +82,6 @@ Rectangle { | |||
82 | y: - dialog.height + root.height | 82 | y: - dialog.height + root.height |
83 | x: root.width | 83 | x: root.width |
84 | 84 | ||
85 | modal: true | ||
86 | |||
87 | Item { | 85 | Item { |
88 | id: content | 86 | id: content |
89 | 87 | ||
diff --git a/framework/qml/Popup.qml b/framework/qml/Popup.qml index 084913e7..baba4933 100644 --- a/framework/qml/Popup.qml +++ b/framework/qml/Popup.qml | |||
@@ -29,4 +29,6 @@ T.Popup { | |||
29 | background: Rectangle { | 29 | background: Rectangle { |
30 | color: Colors.backgroundColor | 30 | color: Colors.backgroundColor |
31 | } | 31 | } |
32 | focus: true | ||
33 | modal: true | ||
32 | } | 34 | } |