1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-01 01:47:23 +03:00

calculate scrolling length in (int) values

--calculations for tasks length exceed must be done
always in same arthmetic world either int or float for
all values. It is chosen the int case because latte
is providing applets length in int values

BUG:439540
This commit is contained in:
Michail Vourlakos 2021-07-10 08:50:19 +03:00
parent 094951d3f9
commit 8bf5b4ad70
2 changed files with 3 additions and 2 deletions

View File

@ -211,7 +211,7 @@ MouseArea {
}
onWheel: {
var wheelActionsEnabled = (root.taskScrollAction !== LatteTasks.Types.ScrollNone || manualScrollTasksEnabled);
var wheelActionsEnabled = (root.taskScrollAction !== LatteTasks.Types.ScrollNone || root.manualScrollTasksEnabled);
if (isSeparator
|| wheelIsBlocked

View File

@ -27,7 +27,8 @@ Flickable{
readonly property bool centered: root.alignment === LatteCore.Types.Center
readonly property bool reversed: Qt.application.layoutDirection === Qt.RightToLeft
readonly property bool contentsExceed: root.scrollingEnabled ? root.tasksLength > flickableContainer.length : false
//! Math.floor is needed in order to make calculations in (int) world
readonly property bool contentsExceed: root.scrollingEnabled ? Math.floor(root.tasksLength) > flickableContainer.length : false
readonly property int contentsExtraSpace: contentsExceed ? root.tasksLength - flickableContainer.length : 0
readonly property real scrollFirstPos: 0