1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-04-21 21:52:03 +02:00

UX: fix behavior with lists scrolling offscreen

Fixes behavior introduced in Qt where flickables (list) can scroll
infinitely off screen. Temporary fix to have more polished feel to
the app. Functionality to have a soft overscroll is supposedly fixed
in Qt 6.7 onward.

Change-Id: I031c590e1a351a0fe0d0ea1ea9ed17c24c5c572b
This commit is contained in:
Andreas Hatziiliou 2024-10-04 13:18:01 -04:00
parent 76417edfa4
commit 386b578e47
6 changed files with 25 additions and 2 deletions

View file

@ -40,6 +40,9 @@ Flickable {
orientation: Qt.Horizontal orientation: Qt.Horizontal
} }
// HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.StopAtBounds
Keys.onLeftPressed: horizontalScrollBar.decrease() Keys.onLeftPressed: horizontalScrollBar.decrease()
Keys.onRightPressed: horizontalScrollBar.increase() Keys.onRightPressed: horizontalScrollBar.increase()
Keys.onUpPressed: verticalScrollBar.decrease() Keys.onUpPressed: verticalScrollBar.decrease()

View file

@ -34,6 +34,9 @@ ListView {
attachedFlickableMoving: root.moving attachedFlickableMoving: root.moving
} }
// HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.StopAtBounds
Keys.onUpPressed: verticalScrollBar.decrease() Keys.onUpPressed: verticalScrollBar.decrease()
Keys.onDownPressed: verticalScrollBar.increase() Keys.onDownPressed: verticalScrollBar.increase()
} }

View file

@ -82,8 +82,9 @@ JamiFlickable {
ScrollBar.vertical.visible: text ScrollBar.vertical.visible: text
ScrollBar.horizontal.visible: text ScrollBar.horizontal.visible: text
boundsMovement: Flickable.StopAtBounds // HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.DragOverBounds boundsBehavior: Flickable.StopAtBounds
interactive: true interactive: true
function resetEditableText() { function resetEditableText() {

View file

@ -30,6 +30,10 @@ ListView {
id: root id: root
spacing: 10 spacing: 10
// HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.StopAtBounds
model: SortFilterProxyModel { model: SortFilterProxyModel {
id: proxyModel id: proxyModel

View file

@ -281,6 +281,9 @@ SidePanelBase {
clip: true clip: true
contentHeight: contentItem.childrenRect.height contentHeight: contentItem.childrenRect.height
// HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.StopAtBounds
model: getHeaders() model: getHeaders()
delegate: ColumnLayout { delegate: ColumnLayout {
id: col id: col
@ -329,6 +332,9 @@ SidePanelBase {
clip: true clip: true
visible: isChildSelected visible: isChildSelected
// HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.StopAtBounds
model: modelData.children model: modelData.children
delegate: ColumnLayout { delegate: ColumnLayout {
id: childCol id: childCol

View file

@ -37,6 +37,9 @@ ListView {
spacing: 5 spacing: 5
cacheBuffer: 10 cacheBuffer: 10
// HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.StopAtBounds
property int rota: 0 property int rota: 0
header: Rectangle { header: Rectangle {
@ -141,6 +144,9 @@ ListView {
model: Count model: Count
// HACK: remove after migration to Qt 6.7+
boundsBehavior: Flickable.StopAtBounds
delegate: RowLayout { delegate: RowLayout {
id: rowLayoutDelegate id: rowLayoutDelegate
height: 40 height: 40