mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Improve scroll to message a bit by using a ScrollView
This commit is contained in:
parent
ca237f36b9
commit
0d61f4bff1
1 changed files with 193 additions and 191 deletions
|
@ -6,13 +6,17 @@ import QtQuick.Layouts 1.2
|
|||
import QtQuick.Window 2.2
|
||||
import im.nheko 1.0
|
||||
|
||||
ListView {
|
||||
ScrollView {
|
||||
contentWidth: availableWidth
|
||||
clip: false
|
||||
palette: colors
|
||||
padding: 8
|
||||
|
||||
ListView {
|
||||
id: chat
|
||||
|
||||
property int delegateMaxWidth: (Settings.timelineMaxWidth > 100 && (parent.width - Settings.timelineMaxWidth) > scrollbar.width * 2) ? Settings.timelineMaxWidth : (parent.width - scrollbar.width * 2 - 8)
|
||||
property int delegateMaxWidth: ((Settings.timelineMaxWidth > 100 && Settings.timelineMaxWidth < parent.availableWidth) ? Settings.timelineMaxWidth : parent.availableWidth) - parent.padding
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
model: TimelineManager.timeline
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
pixelAligned: true
|
||||
|
@ -174,10 +178,6 @@ ListView {
|
|||
|
||||
}
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
id: scrollbar
|
||||
}
|
||||
|
||||
delegate: Item {
|
||||
id: wrapper
|
||||
|
||||
|
@ -222,4 +222,6 @@ ListView {
|
|||
z: 3
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue