diff options
-rw-r--r-- | components/kube/contents/ui/Kube.qml | 5 | ||||
-rw-r--r-- | framework/qml/AccountSwitcher.qml | 2 | ||||
-rw-r--r-- | framework/qml/FocusComposer.qml | 3 | ||||
-rw-r--r-- | framework/qml/People.qml | 13 | ||||
-rw-r--r-- | framework/qml/Popup.qml | 31 | ||||
-rw-r--r-- | framework/qmldir | 1 |
6 files changed, 42 insertions, 13 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index 598cc6bc..9f7f68a3 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml | |||
@@ -411,7 +411,7 @@ Controls2.ApplicationWindow { | |||
411 | //END Notification | 411 | //END Notification |
412 | 412 | ||
413 | //BEGIN Search | 413 | //BEGIN Search |
414 | Controls2.Popup { | 414 | Kube.Popup { |
415 | id: search | 415 | id: search |
416 | 416 | ||
417 | width: app.width * 0.6 | 417 | width: app.width * 0.6 |
@@ -424,7 +424,8 @@ Controls2.ApplicationWindow { | |||
424 | focus: true | 424 | focus: true |
425 | 425 | ||
426 | RowLayout { | 426 | RowLayout { |
427 | anchors.fill: parent | 427 | anchors.centerIn: parent |
428 | width: parent.width | ||
428 | 429 | ||
429 | Controls2.TextField { | 430 | Controls2.TextField { |
430 | id: searchField | 431 | id: searchField |
diff --git a/framework/qml/AccountSwitcher.qml b/framework/qml/AccountSwitcher.qml index 2c5d572e..1fafba27 100644 --- a/framework/qml/AccountSwitcher.qml +++ b/framework/qml/AccountSwitcher.qml | |||
@@ -48,7 +48,7 @@ Controls.ToolButton { | |||
48 | popup.open() | 48 | popup.open() |
49 | } | 49 | } |
50 | 50 | ||
51 | Controls2.Popup { | 51 | Kube.Popup { |
52 | id: popup | 52 | id: popup |
53 | 53 | ||
54 | height: listView.count == 0 ? Kirigami.Units.gridUnit * 4 : Kirigami.Units.gridUnit * 2 + listView.count * Kirigami.Units.gridUnit * 3 | 54 | height: listView.count == 0 ? Kirigami.Units.gridUnit * 4 : Kirigami.Units.gridUnit * 2 + listView.count * Kirigami.Units.gridUnit * 3 |
diff --git a/framework/qml/FocusComposer.qml b/framework/qml/FocusComposer.qml index 823ed32f..e827dbc2 100644 --- a/framework/qml/FocusComposer.qml +++ b/framework/qml/FocusComposer.qml | |||
@@ -24,7 +24,7 @@ import org.kde.kirigami 1.0 as Kirigami | |||
24 | import org.kube.framework 1.0 as Kube | 24 | import org.kube.framework 1.0 as Kube |
25 | 25 | ||
26 | 26 | ||
27 | Controls2.Popup { | 27 | Kube.Popup { |
28 | id: root | 28 | id: root |
29 | 29 | ||
30 | //Controller | 30 | //Controller |
@@ -59,7 +59,6 @@ Controls2.Popup { | |||
59 | 59 | ||
60 | anchors { | 60 | anchors { |
61 | fill: parent | 61 | fill: parent |
62 | margins: Kirigami.Units.largeSpacing | ||
63 | } | 62 | } |
64 | 63 | ||
65 | ColumnLayout { | 64 | ColumnLayout { |
diff --git a/framework/qml/People.qml b/framework/qml/People.qml index 8ccd174d..1a2f15b2 100644 --- a/framework/qml/People.qml +++ b/framework/qml/People.qml | |||
@@ -26,7 +26,7 @@ import org.kde.kirigami 1.0 as Kirigami | |||
26 | import org.kube.framework 1.0 as Kube | 26 | import org.kube.framework 1.0 as Kube |
27 | 27 | ||
28 | 28 | ||
29 | Popup { | 29 | Kube.Popup { |
30 | id: popup | 30 | id: popup |
31 | 31 | ||
32 | property var currentContact | 32 | property var currentContact |
@@ -38,15 +38,13 @@ Popup { | |||
38 | 38 | ||
39 | anchors.fill: parent | 39 | anchors.fill: parent |
40 | 40 | ||
41 | ToolBar { | 41 | Item { |
42 | id: toolbar | 42 | id: toolbar |
43 | 43 | ||
44 | height: searchBar.height + Kube.Units.smallSpacing | ||
44 | width: parent.width | 45 | width: parent.width |
45 | 46 | ||
46 | Controls.ToolButton { | 47 | Controls.ToolButton { |
47 | |||
48 | anchors.verticalCenter: parent.verticalCenter | ||
49 | |||
50 | iconName: Kube.Icons.goBack | 48 | iconName: Kube.Icons.goBack |
51 | 49 | ||
52 | onClicked: stack.pop() | 50 | onClicked: stack.pop() |
@@ -56,7 +54,8 @@ Popup { | |||
56 | 54 | ||
57 | TextField { | 55 | TextField { |
58 | id: searchBar | 56 | id: searchBar |
59 | anchors.centerIn: parent | 57 | |
58 | anchors.horizontalCenter: parent.horizontalCenter | ||
60 | 59 | ||
61 | placeholderText: "Search..." | 60 | placeholderText: "Search..." |
62 | 61 | ||
@@ -64,11 +63,9 @@ Popup { | |||
64 | } | 63 | } |
65 | 64 | ||
66 | Controls.ToolButton { | 65 | Controls.ToolButton { |
67 | |||
68 | anchors { | 66 | anchors { |
69 | right: parent.right | 67 | right: parent.right |
70 | rightMargin: Kube.Units.smallSpacing | 68 | rightMargin: Kube.Units.smallSpacing |
71 | verticalCenter: parent.verticalCenter | ||
72 | } | 69 | } |
73 | 70 | ||
74 | iconName: Kube.Icons.addNew | 71 | iconName: Kube.Icons.addNew |
diff --git a/framework/qml/Popup.qml b/framework/qml/Popup.qml new file mode 100644 index 00000000..6a74fd12 --- /dev/null +++ b/framework/qml/Popup.qml | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Michael Bohlender, <bohlender@kolabsys.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.8 | ||
20 | import QtQuick.Templates 2.1 as T | ||
21 | import org.kube.framework 1.0 | ||
22 | |||
23 | T.Popup { | ||
24 | id: root | ||
25 | |||
26 | padding: Units.largeSpacing | ||
27 | |||
28 | background: Rectangle { | ||
29 | color: Colors.backgroundColor | ||
30 | } | ||
31 | } | ||
diff --git a/framework/qmldir b/framework/qmldir index 74d0168d..1ca1cb72 100644 --- a/framework/qmldir +++ b/framework/qmldir | |||
@@ -14,6 +14,7 @@ People 1.0 People.qml | |||
14 | NotificationPopup 1.0 NotificationPopup.qml | 14 | NotificationPopup 1.0 NotificationPopup.qml |
15 | Icon 1.0 Icon.qml | 15 | Icon 1.0 Icon.qml |
16 | Button 1.0 Button.qml | 16 | Button 1.0 Button.qml |
17 | Popup 1.0 Popup.qml | ||
17 | PositiveButton 1.0 PositiveButton.qml | 18 | PositiveButton 1.0 PositiveButton.qml |
18 | singleton Colors 1.0 Colors.qml | 19 | singleton Colors 1.0 Colors.qml |
19 | singleton Icons 1.0 Icons.qml | 20 | singleton Icons 1.0 Icons.qml |