Add scrollbar to chat messages

This commit is contained in:
Richard Ramos 2020-05-28 18:22:51 -04:00 committed by Iuri Matias
parent 8d2b955bcd
commit f67fb34e69
1 changed files with 34 additions and 23 deletions

View File

@ -1,14 +1,24 @@
import QtQuick 2.3 import QtQuick 2.14
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls 2.12 as QQC2 import QtQuick.Controls 2.14 as QQC2
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import Qt.labs.platform 1.1 import Qt.labs.platform 1.1
import "../../../../shared" import "../../../../shared"
import "../../../../imports" import "../../../../imports"
import "./samples/" import "./samples/"
ListView { ScrollView {
property var messageList: MessagesData {} property var messageList: MessagesData {}
anchors.fill: parent
Layout.fillWidth: true
Layout.fillHeight: true
ScrollBar.vertical.policy: chatLogView.contentHeight > chatLogView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ListView {
anchors.fill: parent
spacing: 4 spacing: 4
id: chatLogView id: chatLogView
model: messageList model: messageList
@ -37,6 +47,7 @@ ListView {
} }
} }
} }
}
/*##^## /*##^##
Designer { Designer {