Commit 434665de authored by Marco Martin's avatar Marco Martin

nicer expanded applets in homescreen

parent b3e1fbea
......@@ -36,7 +36,7 @@ MouseEventListener {
height: mainLayout.Layout.minimumHeight
property int margin: stripe.height + units.gridUnit * 2
property Item draggingApplet
onPressAndHold: {
print(favoritesView.contains(mapToItem(favoritesView, mouse.x, mouse.y)))
if (!root.locked && !favoritesView.contains(mapToItem(favoritesView, mouse.x, mouse.y))) {
......
......@@ -159,6 +159,7 @@ Item {
//not used yet
property bool animationsEnabled: false
property Item applet
z: applet && applet.compactRepresentationItem && applet.expanded ? 99 : 0
Layout.fillWidth: true
Layout.fillHeight: applet && applet.Layout.fillHeight
Layout.onFillHeightChanged: {
......@@ -166,6 +167,7 @@ Item {
checkLastSpacer();
}
}
onAppletChanged: {
if (applet.backgroundHints == PlasmaCore.Types.StandardBackground) {
applet.anchors.margins = background.margins.top;
......
......@@ -42,13 +42,14 @@ Item {
}
onFullRepresentationChanged: {
print(fullRepresentation);
if (!fullRepresentation) {
return;
}
fullRepresentation.parent = appletParent;
fullRepresentation.anchors.fill = fullRepresentation.parent;
fullRepresentation.anchors.margins = appletParent.margins.top;
}
Rectangle {
......@@ -63,8 +64,11 @@ Item {
visible: plasmoid.expanded
}
Item {
PlasmaCore.FrameSvgItem {
id: appletParent
imagePath: "widgets/background"
visible: fullRepresentation.parent == appletParent
z: 99
opacity: plasmoid.expanded ? 1 : 0
anchors.top: parent.top
width: parent.width
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment