mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Change how wheel scrolling works in qml grid views
This fixes scrolling in Qt6
This commit is contained in:
parent
dec297a63c
commit
8f0619887c
@ -428,7 +428,7 @@ Rectangle {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newValue = Math.min((grid.contentHeight - grid.height - (true ? main.continuReadingHeight : main.topContentMargin)), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
var newValue = Math.min((grid.contentHeight - grid.height + grid.originY), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
||||||
grid.contentY = newValue;
|
grid.contentY = newValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -430,11 +430,19 @@ Rectangle {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newValue = Math.min((grid.contentHeight - grid.height - (true ? main.continuReadingHeight : main.topContentMargin)), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
var newValue = Math.min((grid.contentHeight - grid.height + grid.originY), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
||||||
grid.contentY = newValue;
|
grid.contentY = newValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onOriginYChanged: {
|
||||||
|
console.log(" origin changed ", grid.originY)
|
||||||
|
}
|
||||||
|
|
||||||
|
onContentYChanged: {
|
||||||
|
console.log(" content y changed ", grid.contentY)
|
||||||
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
visible: grid.contentHeight > grid.height
|
visible: grid.contentHeight > grid.height
|
||||||
|
|
||||||
|
@ -715,7 +715,7 @@ SplitView {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newValue = Math.min((grid.contentHeight - grid.height - (showCurrentComic ? 270 : 20)), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
var newValue = Math.min((grid.contentHeight - grid.height + grid.originY), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
||||||
grid.contentY = newValue;
|
grid.contentY = newValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -722,7 +722,7 @@ SplitView {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newValue = Math.min((grid.contentHeight - grid.height - (showCurrentComic ? 270 : 20)), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
var newValue = Math.min((grid.contentHeight - grid.height + grid.originY), (Math.max(grid.originY , grid.contentY - event.angleDelta.y)));
|
||||||
grid.contentY = newValue;
|
grid.contentY = newValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user