mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
nicer expanded applets in homescreen
This commit is contained in:
parent
b3e1fbea95
commit
434665decb
3 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue