summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-04-09 00:07:04 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-04-10 08:48:30 +0200
commitd68b24188fd453bd8ca09e3035edc4faee74c6af (patch)
tree8ef4b507d59a59225b7d1573dc469516e952412e /resources
parentMake Filemessage background size by content (diff)
downloadnheko-d68b24188fd453bd8ca09e3035edc4faee74c6af.tar.xz
Size reply background by contents
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/delegates/MessageDelegate.qml1
-rw-r--r--resources/qml/delegates/Reply.qml10
2 files changed, 10 insertions, 1 deletions
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml

index daeb61d6..ff103459 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml
@@ -11,6 +11,7 @@ Item { property alias modelData: model.data height: chooser.childrenRect.height + property real implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : width DelegateChooser { id: chooser diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml
index 06804328..c5ac0ca3 100644 --- a/resources/qml/delegates/Reply.qml +++ b/resources/qml/delegates/Reply.qml
@@ -54,5 +54,13 @@ Rectangle { } } - color: Qt.rgba(userColor.r, userColor.g, userColor.b, 0.2) + color: "transparent" + + Rectangle { + id: backgroundItem + z: -1 + height: replyContainer.height + width: Math.min(Math.max(reply.implicitWidth, userName.implicitWidth) + 8 + 4, parent.width) + color: Qt.rgba(userColor.r, userColor.g, userColor.b, 0.2) + } }