AccountRoomsList highlight delegate scrolling
This commit is contained in:
parent
a78f5506b8
commit
4636a36154
1
TODO.md
1
TODO.md
@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
|
|
||||||
|
- AccountRoomsList highlight delegate movements when reaching the bottom
|
||||||
- `EventImage`s for `m.image` sometimes appear broken, can be made normal
|
- `EventImage`s for `m.image` sometimes appear broken, can be made normal
|
||||||
by switching to another room and coming back
|
by switching to another room and coming back
|
||||||
- First sent message in E2E room is sometimes undecryptable
|
- First sent message in E2E room is sometimes undecryptable
|
||||||
|
@ -14,12 +14,13 @@ HListView {
|
|||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Must handle the highlight's position and size manually because
|
||||||
|
// of our nested lists
|
||||||
highlightFollowsCurrentItem: false
|
highlightFollowsCurrentItem: false
|
||||||
currentItemHeight:
|
highlightRangeMode: ListView.NoHighlightRange
|
||||||
selectedRoom ? selectedRoom.height :
|
|
||||||
currentItem ? currentItem.account.height : 0
|
|
||||||
|
|
||||||
highlight: Rectangle {
|
highlight: Rectangle {
|
||||||
|
id: highlightRectangle
|
||||||
y:
|
y:
|
||||||
selectedRoom ?
|
selectedRoom ?
|
||||||
currentItem.y + currentItem.account.height +
|
currentItem.y + currentItem.account.height +
|
||||||
@ -36,6 +37,18 @@ HListView {
|
|||||||
|
|
||||||
Behavior on y { HNumberAnimation {} }
|
Behavior on y { HNumberAnimation {} }
|
||||||
Behavior on height { HNumberAnimation {} }
|
Behavior on height { HNumberAnimation {} }
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
target: mainPaneList
|
||||||
|
property: "contentY"
|
||||||
|
value: Math.max(
|
||||||
|
0,
|
||||||
|
highlightRectangle.y + highlightRectangle.height / 2 -
|
||||||
|
mainPaneList.height / 2,
|
||||||
|
)
|
||||||
|
when: ! mainPaneList.horizontalOvershoot
|
||||||
|
delayed: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user