mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
don't let the top panel scroll out of sight
This commit is contained in:
parent
49cd27ec5f
commit
ec8cf59ddb
1 changed files with 7 additions and 2 deletions
|
|
@ -137,7 +137,12 @@ FullScreenPanel {
|
||||||
when: !mainFlickable.moving && !mainFlickable.dragging && !mainFlickable.flicking
|
when: !mainFlickable.moving && !mainFlickable.dragging && !mainFlickable.flicking
|
||||||
}
|
}
|
||||||
//no loop as those 2 values compute to exactly the same
|
//no loop as those 2 values compute to exactly the same
|
||||||
onContentYChanged: window.offset = -contentY + contentArea.height - window.headerHeight
|
onContentYChanged: {
|
||||||
|
window.offset = -contentY + contentArea.height - window.headerHeight
|
||||||
|
if (contentY > contentArea.height - headerHeight) {
|
||||||
|
contentY = contentArea.height - headerHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
contentWidth: window.width
|
contentWidth: window.width
|
||||||
contentHeight: window.height*2
|
contentHeight: window.height*2
|
||||||
bottomMargin: window.height
|
bottomMargin: window.height
|
||||||
|
|
@ -168,7 +173,7 @@ FullScreenPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: units.gridUnit
|
height: units.smallSpacing
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue