mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
put the footer in the scroll away area
This commit is contained in:
parent
d7af742066
commit
7b59670deb
2 changed files with 13 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ Flickable {
|
||||||
property int currentIndex: 0
|
property int currentIndex: 0
|
||||||
|
|
||||||
property ContainmentLayoutManager.AppletsLayout appletsLayout: null
|
property ContainmentLayoutManager.AppletsLayout appletsLayout: null
|
||||||
|
property Item footer
|
||||||
|
|
||||||
opacity: 1 - appDrawer.openFactor
|
opacity: 1 - appDrawer.openFactor
|
||||||
transform: Translate {
|
transform: Translate {
|
||||||
|
|
@ -53,6 +54,12 @@ Flickable {
|
||||||
//onCurrentIndexChanged: contentX = width * currentIndex;
|
//onCurrentIndexChanged: contentX = width * currentIndex;
|
||||||
onContentXChanged: mainFlickable.currentIndex = Math.floor(contentX / width)
|
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
|
//Autoscroll related functions
|
||||||
function scrollLeft() {
|
function scrollLeft() {
|
||||||
|
|
@ -144,6 +151,7 @@ Flickable {
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
bottomMargin: mainFlickable.footer ? mainFlickable.footer.height : 0
|
||||||
}
|
}
|
||||||
PlasmaCore.ColorScope.inherit: false
|
PlasmaCore.ColorScope.inherit: false
|
||||||
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,10 @@ FocusScope {
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
topMargin: plasmoid.availableScreenRect.y
|
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
|
appletsLayout: homeScreenContents.appletsLayout
|
||||||
|
|
||||||
appDrawer: appDrawer
|
appDrawer: appDrawer
|
||||||
|
|
@ -122,17 +123,17 @@ FocusScope {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
topPadding: plasmoid.availableScreenRect.y
|
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 {
|
Launcher.FavoriteStrip {
|
||||||
id: favoriteStrip
|
id: favoriteStrip
|
||||||
anchors {
|
/* anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y
|
bottomMargin: plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y
|
||||||
}
|
}*/
|
||||||
appletsLayout: homeScreenContents.appletsLayout
|
appletsLayout: homeScreenContents.appletsLayout
|
||||||
|
|
||||||
visible: flow.children.length > 0 || launcherDragManager.active || homeScreenContents.containsDrag
|
visible: flow.children.length > 0 || launcherDragManager.active || homeScreenContents.containsDrag
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue