put the footer in the scroll away area

This commit is contained in:
Marco Martin 2021-04-08 14:54:06 +02:00
parent d7af742066
commit 7b59670deb
2 changed files with 13 additions and 4 deletions

View file

@ -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

View file

@ -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