Skip to content
Snippets Groups Projects
Commit d2e49553 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Make Filemessage background size by content

parent 5f7f564e
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,7 @@ import QtQuick 2.6
import QtQuick.Layouts 1.2
Rectangle {
radius: 10
color: colors.dark
color: "transparent"
height: row.height + 24
width: parent ? parent.width : undefined
......@@ -39,6 +38,7 @@ Rectangle {
id: col
Text {
id: filename
Layout.fillWidth: true
text: model.data.body
textFormat: Text.PlainText
......@@ -46,6 +46,7 @@ Rectangle {
color: colors.text
}
Text {
id: filesize
Layout.fillWidth: true
text: model.data.filesize
textFormat: Text.PlainText
......@@ -54,4 +55,13 @@ Rectangle {
}
}
}
Rectangle {
color: colors.dark
z: -1
radius: 10
height: row.height + 24
width: 44 + 24 + 24 + Math.max(Math.min(filesize.width, filesize.implicitWidth), Math.min(filename.width, filename.implicitWidth))
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment