From 7b59670debcf8e897712547a69470328a81bc2eb Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 8 Apr 2021 14:54:06 +0200 Subject: [PATCH] put the footer in the scroll away area --- .../package/contents/ui/launcher/FlickablePages.qml | 8 ++++++++ containments/homescreen/package/contents/ui/main.qml | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/containments/homescreen/package/contents/ui/launcher/FlickablePages.qml b/containments/homescreen/package/contents/ui/launcher/FlickablePages.qml index c51d14b4..575c90bc 100644 --- a/containments/homescreen/package/contents/ui/launcher/FlickablePages.qml +++ b/containments/homescreen/package/contents/ui/launcher/FlickablePages.qml @@ -31,6 +31,7 @@ Flickable { property int currentIndex: 0 property ContainmentLayoutManager.AppletsLayout appletsLayout: null + property Item footer opacity: 1 - appDrawer.openFactor transform: Translate { @@ -53,6 +54,12 @@ Flickable { //onCurrentIndexChanged: contentX = width * currentIndex; onContentXChanged: mainFlickable.currentIndex = Math.floor(contentX / width) + onFooterChanged: { + footer.parent = mainFlickable; + footer.anchors.left = mainFlickable.left; + footer.anchors.bottom = mainFlickable.bottom; + footer.anchors.right = mainFlickable.right; + } //Autoscroll related functions function scrollLeft() { @@ -144,6 +151,7 @@ Flickable { anchors { bottom: parent.bottom horizontalCenter: parent.horizontalCenter + bottomMargin: mainFlickable.footer ? mainFlickable.footer.height : 0 } PlasmaCore.ColorScope.inherit: false PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.ComplementaryColorGroup diff --git a/containments/homescreen/package/contents/ui/main.qml b/containments/homescreen/package/contents/ui/main.qml index f5fb804c..236a8f4f 100644 --- a/containments/homescreen/package/contents/ui/main.qml +++ b/containments/homescreen/package/contents/ui/main.qml @@ -102,9 +102,10 @@ FocusScope { anchors { fill: parent topMargin: plasmoid.availableScreenRect.y - bottomMargin: favoriteStrip.height + plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y + bottomMargin: /*favoriteStrip.height +*/ plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y } + footer: favoriteStrip appletsLayout: homeScreenContents.appletsLayout appDrawer: appDrawer @@ -122,17 +123,17 @@ FocusScope { anchors.fill: parent topPadding: plasmoid.availableScreenRect.y - bottomPadding: favoriteStrip.height + plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y + bottomPadding: /*favoriteStrip.height + */plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y } Launcher.FavoriteStrip { id: favoriteStrip - anchors { + /* anchors { left: parent.left right: parent.right bottom: parent.bottom bottomMargin: plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y - } + }*/ appletsLayout: homeScreenContents.appletsLayout visible: flow.children.length > 0 || launcherDragManager.active || homeScreenContents.containsDrag