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); var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y);
//SCROLL UP //SCROLL UP
if (pos.y < plasmoid.fullRepresentationItem.height / 4) { if (pos.y < plasmoid.availableScreenRect.y + units.gridUnit) {
plasmoid.fullRepresentationItem.scrollUp(); plasmoid.fullRepresentationItem.scrollUp();
//SCROLL DOWN //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(); plasmoid.fullRepresentationItem.scrollDown();
//DON't SCROLL //DON't SCROLL
} else { } else {

View file

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