mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-05 22:26:16 +00:00
autofmt
This commit is contained in:
@@ -120,7 +120,7 @@ RowLayout {
|
||||
width: ListView.view ? ListView.view.width : (parentComboBox ? parentComboBox.width - Style.marginM * 3 : 0)
|
||||
hoverEnabled: true
|
||||
highlighted: ListView.view.currentIndex === itemIndex
|
||||
|
||||
|
||||
property bool pendingClick: false
|
||||
Timer {
|
||||
id: clickRetryTimer
|
||||
|
||||
@@ -112,37 +112,37 @@ Item {
|
||||
ListView {
|
||||
id: listView
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
anchors.rightMargin: root.verticalScrollBarActive ? root.handleWidth + 4 : 0
|
||||
clip: true
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
flickDeceleration: 1500
|
||||
|
||||
|
||||
Timer {
|
||||
id: scrollbarActiveTimer
|
||||
interval: 150
|
||||
repeat: false
|
||||
}
|
||||
|
||||
|
||||
WheelHandler {
|
||||
id: wheelHandler
|
||||
target: listView
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
||||
|
||||
onWheel: function(event) {
|
||||
|
||||
onWheel: function (event) {
|
||||
if (listView.flicking || listView.moving) {
|
||||
listView.cancelFlick();
|
||||
}
|
||||
|
||||
|
||||
var delta = event.pixelDelta.y !== 0 ? event.pixelDelta.y : (event.angleDelta.y / 8);
|
||||
var newContentY = listView.contentY - delta;
|
||||
newContentY = Math.max(0, Math.min(newContentY, listView.contentHeight - listView.height));
|
||||
listView.contentY = newContentY;
|
||||
|
||||
|
||||
if (listView.ScrollBar.vertical) {
|
||||
listView.ScrollBar.vertical.active = true;
|
||||
}
|
||||
|
||||
|
||||
scrollbarActiveTimer.restart();
|
||||
event.accepted = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user