mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
better detection if we are on the fav strip
This commit is contained in:
parent
fa2d6b0258
commit
f9b30c1f95
1 changed files with 7 additions and 3 deletions
|
|
@ -116,7 +116,7 @@ MouseEventListener {
|
||||||
property bool scrollDown: true
|
property bool scrollDown: true
|
||||||
repeat: true
|
repeat: true
|
||||||
interval: 10
|
interval: 10
|
||||||
onTriggered: {
|
onTriggered: {return;
|
||||||
applicationsView.contentY += scrollDown ? 8 : -8;
|
applicationsView.contentY += scrollDown ? 8 : -8;
|
||||||
if (applicationsView.dragData) {
|
if (applicationsView.dragData) {
|
||||||
dragDelegate.updateRow();
|
dragDelegate.updateRow();
|
||||||
|
|
@ -188,15 +188,19 @@ MouseEventListener {
|
||||||
|
|
||||||
if (!autoScrollTimer.running) {
|
if (!autoScrollTimer.running) {
|
||||||
|
|
||||||
|
var pos = mapToItem(applicationsView.headerItem.favoritesStrip, mouse.x, mouse.y);
|
||||||
if (mouse.y < root.height / 4) {
|
//FAVORITES
|
||||||
|
if (applicationsView.headerItem.favoritesStrip.contains(pos)) {
|
||||||
autoScrollTimer.running = false;
|
autoScrollTimer.running = false;
|
||||||
|
//SCROLL UP
|
||||||
} else if (applicationsView.contentY > 0 && mouse.y < root.buttonHeight + root.height / 4) {
|
} else if (applicationsView.contentY > 0 && mouse.y < root.buttonHeight + root.height / 4) {
|
||||||
autoScrollTimer.scrollDown = false;
|
autoScrollTimer.scrollDown = false;
|
||||||
autoScrollTimer.running = true;
|
autoScrollTimer.running = true;
|
||||||
|
//SCROLL DOWN
|
||||||
} else if (!applicationsView.atYEnd && mouse.y > 3 * (root.height / 4)) {
|
} else if (!applicationsView.atYEnd && mouse.y > 3 * (root.height / 4)) {
|
||||||
autoScrollTimer.scrollDown = true;
|
autoScrollTimer.scrollDown = true;
|
||||||
autoScrollTimer.running = true;
|
autoScrollTimer.running = true;
|
||||||
|
//DON't SCROLL
|
||||||
} else {
|
} else {
|
||||||
autoScrollTimer.running = false;
|
autoScrollTimer.running = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue