1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 22:12:50 -05:00

Update more scrolling enhancements

This commit is contained in:
purian23
2025-08-07 00:14:56 -04:00
parent 722fd36c0a
commit d2ba398d68
18 changed files with 355 additions and 44 deletions

View File

@@ -439,10 +439,10 @@ DankModal {
model: filteredClipboardModel
spacing: Theme.spacingXS
// Enhanced native kinetic scrolling - faster for both touchpad and mouse
// Qt 6.9+ scrolling: flickDeceleration/maximumFlickVelocity only affect touch now
interactive: true
flickDeceleration: 1000 // Lower = more momentum, longer scrolling
maximumFlickVelocity: 8000 // Higher = faster maximum scroll speed
flickDeceleration: 1500 // Touch only in Qt 6.9+ // Lower = more momentum, longer scrolling
maximumFlickVelocity: 2000 // Touch only in Qt 6.9+ // Higher = faster maximum scroll speed
boundsBehavior: Flickable.DragAndOvershootBounds
boundsMovement: Flickable.FollowBoundsBehavior
pressDelay: 0

View File

@@ -203,10 +203,10 @@ DankModal {
ScrollBar.vertical: ScrollBar { policy: ScrollBar.AsNeeded }
ScrollBar.horizontal: ScrollBar { policy: ScrollBar.AlwaysOff }
// Enhanced native kinetic scrolling - faster for both touchpad and mouse
// Qt 6.9+ scrolling: flickDeceleration/maximumFlickVelocity only affect touch now
interactive: true
flickDeceleration: 1000 // Lower = more momentum, longer scrolling
maximumFlickVelocity: 8000 // Higher = faster maximum scroll speed
flickDeceleration: 1500 // Touch only in Qt 6.9+ // Lower = more momentum, longer scrolling
maximumFlickVelocity: 2000 // Touch only in Qt 6.9+ // Higher = faster maximum scroll speed
boundsBehavior: Flickable.DragAndOvershootBounds
boundsMovement: Flickable.FollowBoundsBehavior
pressDelay: 0

View File

@@ -96,14 +96,26 @@ DankModal {
contentWidth: width
contentHeight: detailsRect.height
// Enhanced native kinetic scrolling - faster for both touchpad and mouse
// Qt 6.9+ scrolling: flickDeceleration/maximumFlickVelocity only affect touch now
interactive: true
flickDeceleration: 1000 // Lower = more momentum, longer scrolling
maximumFlickVelocity: 8000 // Higher = faster maximum scroll speed
flickDeceleration: 1500
maximumFlickVelocity: 2000
boundsBehavior: Flickable.DragAndOvershootBounds
boundsMovement: Flickable.FollowBoundsBehavior
pressDelay: 0
flickableDirection: Flickable.VerticalFlick
// Custom wheel handler for Qt 6.9+ responsive mouse wheel scrolling
WheelHandler {
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
onWheel: (event) => {
let delta = event.pixelDelta.y !== 0 ? event.pixelDelta.y * 1.8 : event.angleDelta.y / 120 * 60
let newY = parent.contentY - delta
newY = Math.max(0, Math.min(parent.contentHeight - parent.height, newY))
parent.contentY = newY
event.accepted = true
}
}
Rectangle {
id: detailsRect