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:
parent
094951d3f9
commit
8bf5b4ad70
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user