autoscroll only at the very edges

This commit is contained in:
Marco Martin 2019-09-02 18:32:18 +02:00
parent ba9babb186
commit d54a63ba04
2 changed files with 4 additions and 4 deletions

View file

@ -78,10 +78,10 @@ ContainmentLayoutManager.ItemContainer {
var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y);
//SCROLL UP
if (pos.y < plasmoid.fullRepresentationItem.height / 4) {
if (pos.y < plasmoid.availableScreenRect.y + units.gridUnit) {
plasmoid.fullRepresentationItem.scrollUp();
//SCROLL DOWN
} else if (pos.y > 3 * (plasmoid.fullRepresentationItem.height / 4)) {
} else if (pos.y > plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height - units.gridUnit) {
plasmoid.fullRepresentationItem.scrollDown();
//DON't SCROLL
} else {

View file

@ -321,8 +321,8 @@ Item {
ScrollIndicator {
id: scrollDownIndicator
anchors {
bottom: parent.bottom
bottomMargin: units.gridUnit * 2
bottom: favoriteStrip.top
bottomMargin: units.gridUnit
}
elementId: "down-arrow"
}