From 507b3d77b585d3c5fdd37e56d19f9ac0a88a4241 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 21 Jun 2015 10:16:20 -0700 Subject: [PATCH] better looking expanded popup --- shell/contents/applet/CompactApplet.qml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/shell/contents/applet/CompactApplet.qml b/shell/contents/applet/CompactApplet.qml index 2338bd66..91e6c0cb 100644 --- a/shell/contents/applet/CompactApplet.qml +++ b/shell/contents/applet/CompactApplet.qml @@ -42,7 +42,7 @@ Item { } onFullRepresentationChanged: { -print(fullRepresentation); + if (!fullRepresentation) { return; } @@ -67,13 +67,24 @@ print(fullRepresentation); PlasmaCore.FrameSvgItem { id: appletParent imagePath: "widgets/background" - visible: fullRepresentation.parent == appletParent + //used only indesktop mode, not panel + visible: plasmoid.formFactor == PlasmaCore.Types.Planar z: 99 opacity: plasmoid.expanded ? 1 : 0 anchors.top: parent.top width: parent.width height: units.gridUnit * 20 - units.iconSizes.medium + MouseArea { + visible: plasmoid.expanded + anchors { + fill: parent + topMargin: -appletParent.height + bottomMargin: -appletParent.height + } + z: -1 + onClicked: plasmoid.expanded = false; + } Behavior on opacity { OpacityAnimator { duration: units.longDuration