mirror of
https://github.com/stemoretti/BaseUI.git
synced 2025-07-17 20:44:22 -04:00
Heavy changes
This commit is contained in:
42
qml/ListViewEdgeEffect.qml
Normal file
42
qml/ListViewEdgeEffect.qml
Normal file
@ -0,0 +1,42 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
ListView {
|
||||
id: root
|
||||
|
||||
boundsMovement: Flickable.StopAtBounds
|
||||
boundsBehavior: Flickable.DragOverBounds
|
||||
|
||||
// XXX: disable optimizations
|
||||
cacheBuffer: height * 1000
|
||||
|
||||
add: Transition {
|
||||
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 200 }
|
||||
}
|
||||
moveDisplaced: Transition {
|
||||
NumberAnimation { property: "y"; duration: 200 }
|
||||
}
|
||||
removeDisplaced: Transition {
|
||||
NumberAnimation { property: "y"; duration: 200 }
|
||||
}
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator { }
|
||||
|
||||
EdgeEffect {
|
||||
width: root.width
|
||||
anchors.top: root.top
|
||||
side: EdgeEffect.Side.Top
|
||||
overshoot: root.verticalOvershoot < 0 ? -root.verticalOvershoot : 0
|
||||
maxOvershoot: root.height
|
||||
color: Style.isDarkTheme ? "gray" : "darkgray"
|
||||
}
|
||||
|
||||
EdgeEffect {
|
||||
width: root.width
|
||||
anchors.bottom: root.bottom
|
||||
side: EdgeEffect.Side.Bottom
|
||||
overshoot: root.verticalOvershoot > 0 ? root.verticalOvershoot : 0
|
||||
maxOvershoot: root.height
|
||||
color: Style.isDarkTheme ? "gray" : "darkgray"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user