mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +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
|
||||
|
||||
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
|
||||
|
||||
|
@ -223,3 +223,5 @@ ListView {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue