summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui/AccountSwitcher.qml
diff options
context:
space:
mode:
Diffstat (limited to 'components/package/contents/ui/AccountSwitcher.qml')
-rw-r--r--components/package/contents/ui/AccountSwitcher.qml27
1 files changed, 11 insertions, 16 deletions
diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml
index 8767e96e..14686665 100644
--- a/components/package/contents/ui/AccountSwitcher.qml
+++ b/components/package/contents/ui/AccountSwitcher.qml
@@ -20,6 +20,8 @@ import QtQuick 2.4
20import QtQuick.Controls 1.3 20import QtQuick.Controls 1.3
21import QtQuick.Layouts 1.1 21import QtQuick.Layouts 1.1
22 22
23import QtQuick.Controls 2.0 as Controls2
24
23import org.kde.kirigami 1.0 as Kirigami 25import org.kde.kirigami 1.0 as Kirigami
24 26
25import org.kube.framework.domain 1.0 as KubeFramework 27import org.kube.framework.domain 1.0 as KubeFramework
@@ -35,26 +37,21 @@ Button {
35 tooltip: "switch accounts, edit them and add new ones" 37 tooltip: "switch accounts, edit them and add new ones"
36 38
37 onClicked: { 39 onClicked: {
38 dialog.visible = dialog.visible ? false : true 40 popup.open()
39 } 41 }
40 42
41 Rectangle { 43 Controls2.Popup {
42 id: dialog 44 id: popup
43
44 anchors {
45 top: parent.bottom
46 left: parent.left
47 }
48 45
49 height: 300 46 height: 300
50 width: 600 47 width: 600
51 48
52 color: Kirigami.Theme.backgroundColor 49 x: parent.x
53 border.width: 1 50 y: parent.y + parent.height
54 border.color: Kirigami.Theme.highlightColor //TODO change to Kirigami inactive text color once it is available 51
55 radius: 3 52 modal: true
56 clip: true 53 focus: true
57 visible: false 54 closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
58 55
59 Item { 56 Item {
60 id: footer 57 id: footer
@@ -80,7 +77,6 @@ Button {
80 77
81 onClicked: { 78 onClicked: {
82 newAccountComponent.createObject(app) 79 newAccountComponent.createObject(app)
83 dialog.visible = false
84 } 80 }
85 81
86 Component { 82 Component {
@@ -105,7 +101,6 @@ Button {
105 101
106 onClicked: { 102 onClicked: {
107 syncAction.execute() 103 syncAction.execute()
108 dialog.visible = false
109 } 104 }
110 } 105 }
111 } 106 }