Remove allowDragging, as it is not needed anymore
This commit is contained in:
		| @@ -5,7 +5,6 @@ import QtQuick.Controls 2.12 | ||||
|  | ||||
| GridView { | ||||
|     id: gridView | ||||
|     interactive: allowDragging | ||||
|     currentIndex: -1 | ||||
|     keyNavigationWraps: true | ||||
|     highlightMoveDuration: theme.animationDuration | ||||
| @@ -23,7 +22,7 @@ GridView { | ||||
|     } | ||||
|  | ||||
|     ScrollBar.vertical: ScrollBar { | ||||
|         visible: gridView.interactive || ! gridView.allowDragging | ||||
|         visible: gridView.interactive | ||||
|     } | ||||
|  | ||||
|     // property bool debug: false | ||||
| @@ -59,7 +58,6 @@ GridView { | ||||
|     onSelectedCountChanged: if (! selectedCount) lastCheckedDelegateIndex = 0 | ||||
|  | ||||
|  | ||||
|     property bool allowDragging: true | ||||
|     property alias cursorShape: mouseArea.cursorShape | ||||
|     property int currentItemHeight: currentItem ? currentItem.height : 0 | ||||
|  | ||||
| @@ -119,17 +117,9 @@ GridView { | ||||
|     } | ||||
|  | ||||
|  | ||||
|     Connections { | ||||
|         target: gridView | ||||
|         enabled: ! gridView.allowDragging | ||||
|         // interactive gets temporarily set to true below to allow wheel scroll | ||||
|         onDraggingChanged: gridView.interactive = false | ||||
|     } | ||||
|  | ||||
|     MouseArea { | ||||
|         id: mouseArea | ||||
|         anchors.fill: parent | ||||
|         enabled: ! parent.allowDragging || cursorShape !== Qt.ArrowCursor | ||||
|         acceptedButtons: Qt.NoButton | ||||
|         onWheel: { | ||||
|             // Allow wheel usage, will be back to false on any drag attempt | ||||
|   | ||||
| @@ -5,8 +5,6 @@ import QtQuick.Controls 2.12 | ||||
|  | ||||
| ListView { | ||||
|     id: listView | ||||
|     //interactive: allowDragging | ||||
|     interactive: false | ||||
|     currentIndex: -1 | ||||
|     keyNavigationWraps: true | ||||
|     highlightMoveDuration: theme.animationDuration | ||||
| @@ -25,7 +23,7 @@ ListView { | ||||
|     } | ||||
|  | ||||
|     ScrollBar.vertical: ScrollBar { | ||||
|         visible: listView.interactive || ! listView.allowDragging | ||||
|         visible: listView.interactive | ||||
|     } | ||||
|  | ||||
|     // property bool debug: false | ||||
| @@ -61,7 +59,6 @@ ListView { | ||||
|     onSelectedCountChanged: if (! selectedCount) lastCheckedDelegateIndex = 0 | ||||
|  | ||||
|  | ||||
|     property bool allowDragging: true | ||||
|     property alias cursorShape: mouseArea.cursorShape | ||||
|     property int currentItemHeight: currentItem ? currentItem.height : 0 | ||||
|  | ||||
| @@ -121,17 +118,9 @@ ListView { | ||||
|     } | ||||
|  | ||||
|  | ||||
|     Connections { | ||||
|         target: listView | ||||
|         enabled: ! listView.allowDragging | ||||
|         // interactive gets temporarily set to true below to allow wheel scroll | ||||
|         onDraggingChanged: listView.interactive = false | ||||
|     } | ||||
|  | ||||
|     HScrollMouseArea { | ||||
|         id: mouseArea | ||||
|         anchors.fill: parent | ||||
|         enabled: ! parent.allowDragging || cursorShape !== Qt.ArrowCursor | ||||
|         acceptedButtons: Qt.NoButton | ||||
|         flickable: listView | ||||
|     } | ||||
|   | ||||
| @@ -325,7 +325,7 @@ QtObject { | ||||
|     function flickPages(flickable, pages) { | ||||
|         // Adapt velocity and deceleration for the number of pages to flick. | ||||
|         // If this is a repeated flicking, flick faster than a single flick. | ||||
|         if (! flickable.interactive && flickable.allowDragging) return | ||||
|         if (! flickable.interactive) return | ||||
|  | ||||
|         const futureVelocity  = -flickable.height * pages | ||||
|         const currentVelocity = -flickable.verticalVelocity | ||||
| @@ -351,7 +351,7 @@ QtObject { | ||||
|  | ||||
|  | ||||
|     function flickToTop(flickable) { | ||||
|         if (! flickable.interactive && flickable.allowDragging) return | ||||
|         if (! flickable.interactive) return | ||||
|         if (flickable.visibleArea.yPosition < 0) return | ||||
|  | ||||
|         flickable.contentY -= flickable.contentHeight | ||||
| @@ -361,7 +361,7 @@ QtObject { | ||||
|  | ||||
|  | ||||
|     function flickToBottom(flickable) { | ||||
|         if (! flickable.interactive && flickable.allowDragging) return | ||||
|         if (! flickable.interactive) return | ||||
|         if (flickable.visibleArea.yPosition < 0) return | ||||
|  | ||||
|         flickable.contentY = flickable.contentHeight - flickable.height | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	