From c72539d2cf1dfa43a0a874ea4877d6047ba3dcb8 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Tue, 21 Jun 2016 16:44:43 +0200 Subject: create OverlayDialog component and use it everywhere --- .../package/contents/ui/EditAccountDialog.qml | 30 +++------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'components/package/contents/ui/EditAccountDialog.qml') diff --git a/components/package/contents/ui/EditAccountDialog.qml b/components/package/contents/ui/EditAccountDialog.qml index 26934c94..887f50e1 100644 --- a/components/package/contents/ui/EditAccountDialog.qml +++ b/components/package/contents/ui/EditAccountDialog.qml @@ -23,48 +23,26 @@ import org.kde.kirigami 1.0 as Kirigami import org.kube.framework.settings 1.0 as KubeSettings import org.kube.framework.domain 1.0 as KubeFramework -import org.kube.framework.theme 1.0 +import org.kube.components 1.0 as KubeComponents -Item { +KubeComponents.OverlayDialog { id: root property variant uiSource property variant accountId - Rectangle { - id: background - - anchors.fill: parent - - color: "black" - opacity: 0.9 - } - - MouseArea { - anchors.fill: parent - onClicked: { - root.destroy() - } - } - - Rectangle { + Item { id: dialog anchors.centerIn: parent height: root.height * 0.8 width: root.width * 0.8 - color: Kirigami.Theme.backgroundColor - - MouseArea { - anchors.fill: parent - } - Loader { anchors.fill: parent source: root.uiSource - onLoaded: item.accountId = root.accountId + onLoaded: item.accountId = root.accountId } } } -- cgit v1.2.3