Hide room name, if not loaded yet

This commit is contained in:
Nicolas Werner 2020-10-18 22:30:42 +02:00
parent 1f68bc60b5
commit b3a7f0b888
2 changed files with 9 additions and 5 deletions

View file

@ -159,6 +159,7 @@ Page {
} }
ColumnLayout { ColumnLayout {
visible: TimelineManager.timeline != null
anchors.fill: parent anchors.fill: parent
Rectangle { Rectangle {
@ -287,7 +288,6 @@ Page {
property int delegateMaxWidth: (Settings.timelineMaxWidth > 100 && (parent.width - Settings.timelineMaxWidth) > scrollbar.width * 2) ? Settings.timelineMaxWidth : (parent.width - scrollbar.width * 2) property int delegateMaxWidth: (Settings.timelineMaxWidth > 100 && (parent.width - Settings.timelineMaxWidth) > scrollbar.width * 2) ? Settings.timelineMaxWidth : (parent.width - scrollbar.width * 2)
visible: TimelineManager.timeline != null
cacheBuffer: 400 cacheBuffer: 400
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true

View file

@ -32,6 +32,7 @@ Item {
MouseArea { MouseArea {
id: mouseArea id: mouseArea
enabled: model.data.type == MtxEvent.ImageMessage && img.status == Image.Ready enabled: model.data.type == MtxEvent.ImageMessage && img.status == Image.Ready
hoverEnabled: true hoverEnabled: true
anchors.fill: parent anchors.fill: parent
@ -40,23 +41,23 @@ Item {
Item { Item {
id: overlay id: overlay
anchors.fill: parent anchors.fill: parent
visible: mouseArea.containsMouse visible: mouseArea.containsMouse
Rectangle { Rectangle {
id: container id: container
width: parent.width width: parent.width
implicitHeight: imgcaption.implicitHeight implicitHeight: imgcaption.implicitHeight
anchors.bottom: overlay.bottom anchors.bottom: overlay.bottom
color: colors.window color: colors.window
opacity: 0.75 opacity: 0.75
} }
Text { Text {
id: imgcaption id: imgcaption
anchors.fill: container anchors.fill: container
elide: Text.ElideMiddle elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@ -65,6 +66,9 @@ Item {
text: model.data.filename ? model.data.filename : model.data.body text: model.data.filename ? model.data.filename : model.data.body
color: colors.text color: colors.text
} }
} }
} }
} }