[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kube/develop] components: make accountswitcher a qqc2 popup
From: Michael Bohlender <michael.bohlender () kdemail ! net>
Date: 2016-11-16 17:10:26
Message-ID: E1c73j8-0002iv-Pv () code ! kde ! org
[Download RAW message or body]
Git commit c10ea09be56a1945c9025afaaf0c98b7c37657e7 by Michael Bohlender.
Committed on 16/11/2016 at 17:09.
Pushed by mbohlender into branch 'develop'.
make accountswitcher a qqc2 popup
M +4 -1 components/mail/contents/ui/main.qml
M +11 -16 components/package/contents/ui/AccountSwitcher.qml
http://commits.kde.org/kontact-quick/c10ea09be56a1945c9025afaaf0c98b7c37657e7
diff --git a/components/mail/contents/ui/main.qml \
b/components/mail/contents/ui/main.qml index 405458c..c891ea5 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -20,6 +20,9 @@
import QtQuick 2.7
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
+
+import QtQuick.Controls 2.0 as Controls2
+
import org.kde.kirigami 1.0 as Kirigami
import org.kube.framework.actions 1.0 as KubeAction
@@ -27,7 +30,7 @@ import org.kube.framework.settings 1.0 as KubeSettings
import org.kube.framework.domain 1.0 as KubeFramework
import org.kube.components 1.0 as KubeComponents
-ApplicationWindow {
+Controls2.ApplicationWindow {
id: app
//FIXME remove fixed pixel hight
diff --git a/components/package/contents/ui/AccountSwitcher.qml \
b/components/package/contents/ui/AccountSwitcher.qml index 8767e96..1468666 100644
--- a/components/package/contents/ui/AccountSwitcher.qml
+++ b/components/package/contents/ui/AccountSwitcher.qml
@@ -20,6 +20,8 @@ import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
+import QtQuick.Controls 2.0 as Controls2
+
import org.kde.kirigami 1.0 as Kirigami
import org.kube.framework.domain 1.0 as KubeFramework
@@ -35,26 +37,21 @@ Button {
tooltip: "switch accounts, edit them and add new ones"
onClicked: {
- dialog.visible = dialog.visible ? false : true
+ popup.open()
}
- Rectangle {
- id: dialog
-
- anchors {
- top: parent.bottom
- left: parent.left
- }
+ Controls2.Popup {
+ id: popup
height: 300
width: 600
- color: Kirigami.Theme.backgroundColor
- border.width: 1
- border.color: Kirigami.Theme.highlightColor //TODO change to Kirigami \
inactive text color once it is available
- radius: 3
- clip: true
- visible: false
+ x: parent.x
+ y: parent.y + parent.height
+
+ modal: true
+ focus: true
+ closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
Item {
id: footer
@@ -80,7 +77,6 @@ Button {
onClicked: {
newAccountComponent.createObject(app)
- dialog.visible = false
}
Component {
@@ -105,7 +101,6 @@ Button {
onClicked: {
syncAction.execute()
- dialog.visible = false
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic