Rework models hierarchy, room categories models

This commit is contained in:
miruka
2019-05-02 14:20:21 -04:00
parent ada44cf6f7
commit 047225fded
23 changed files with 325 additions and 293 deletions

View File

@@ -1,7 +1,7 @@
import QtQuick 2.7
import "../../Base"
HNoticeLabel {
HNoticePage {
text: dateTime.toLocaleDateString()
color: HStyle.chat.daybreak.foreground
backgroundColor: HStyle.chat.daybreak.background

View File

@@ -1,5 +1,4 @@
import QtQuick 2.7
import QtQuick.Layouts 1.3
import "../../Base"
HGlassRectangle {
@@ -8,9 +7,6 @@ HGlassRectangle {
color: HStyle.chat.roomEventList.background
Layout.fillWidth: true
Layout.fillHeight: true
ListView {
id: roomEventListView
delegate: RoomEventDelegate {}
@@ -20,7 +16,6 @@ HGlassRectangle {
anchors.leftMargin: space
anchors.rightMargin: space
clip: true
topMargin: space
bottomMargin: space
verticalLayoutDirection: ListView.BottomToTop
@@ -39,10 +34,10 @@ HGlassRectangle {
}
}
HNoticeLabel {
HNoticePage {
text: qsTr("Nothing to show here yet...")
visible: roomEventListView.model.count < 1
anchors.centerIn: parent
anchors.fill: parent
}
}