2020-09-23 19:57:54 -04:00
|
|
|
// Copyright Mirage authors & contributors <https://github.com/mirukana/mirage>
|
2019-12-19 07:46:16 -04:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-07-20 15:06:38 -04:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
|
|
|
|
Flickable {
|
2020-07-22 14:57:32 -03:00
|
|
|
id: flickable
|
2020-10-07 20:12:32 -04:00
|
|
|
maximumFlickVelocity: window.settings.Scrolling.kinetic_max_speed
|
|
|
|
flickDeceleration: window.settings.Scrolling.kinetic_deceleration
|
2020-07-14 05:35:53 -04:00
|
|
|
|
2020-06-19 12:03:04 -04:00
|
|
|
ScrollBar.vertical: HScrollBar {
|
2020-05-18 11:53:26 -03:00
|
|
|
visible: parent.interactive
|
2020-07-19 03:02:14 -04:00
|
|
|
z: 999
|
2020-08-19 09:36:52 -04:00
|
|
|
flickableMoving: flickable.moving
|
2020-05-15 20:32:44 -03:00
|
|
|
}
|
2020-07-22 14:57:32 -03:00
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
kineticScrollingDisabler = Qt.createComponent(
|
|
|
|
"HKineticScrollingDisabler.qml"
|
2020-08-21 04:58:03 -04:00
|
|
|
).createObject(flickable, {flickable})
|
|
|
|
|
|
|
|
kineticScrollingDisabler.width = Qt.binding(() =>
|
|
|
|
kineticScrollingDisabler.enabled ? flickable.width : 0
|
|
|
|
)
|
|
|
|
kineticScrollingDisabler.height = Qt.binding(() =>
|
|
|
|
kineticScrollingDisabler.enabled ? flickable.height : 0
|
|
|
|
)
|
2020-07-22 14:57:32 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
property var kineticScrollingDisabler
|
2019-07-20 15:06:38 -04:00
|
|
|
}
|