From 1d681621e7bbe2c1eb80433c024f800b463e9438 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 18 Oct 2016 16:25:12 +0200 Subject: [PATCH] fix(Chat/Message): use other workaround to force the right message size --- tests/ui/modules/Linphone/Chat/IncomingMessage.qml | 4 ++++ tests/ui/modules/Linphone/Chat/Message.qml | 5 ----- tests/ui/modules/Linphone/Chat/OutgoingMessage.qml | 4 ++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/ui/modules/Linphone/Chat/IncomingMessage.qml b/tests/ui/modules/Linphone/Chat/IncomingMessage.qml index 3237e5777..759b66a6b 100644 --- a/tests/ui/modules/Linphone/Chat/IncomingMessage.qml +++ b/tests/ui/modules/Linphone/Chat/IncomingMessage.qml @@ -19,6 +19,10 @@ RowLayout { id: message Layout.fillWidth: true + + // Not a style. Workaround to avoid a 0 width. + Layout.minimumWidth: 0 + backgroundColor: '#BFBFBF' } } diff --git a/tests/ui/modules/Linphone/Chat/Message.qml b/tests/ui/modules/Linphone/Chat/Message.qml index 812508dde..472dbacbf 100644 --- a/tests/ui/modules/Linphone/Chat/Message.qml +++ b/tests/ui/modules/Linphone/Chat/Message.qml @@ -40,9 +40,4 @@ Item { anchors.left: rectangle.right } - - // In some case the initial `implicitHeight` - // state is incorrect. This line is a workaround that forces - // the `height` attribute. - Component.onCompleted: height = text.contentHeight + text.padding * 2 } diff --git a/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml b/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml index e5c8c5fe7..736adcf31 100644 --- a/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml +++ b/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml @@ -12,6 +12,10 @@ RowLayout { id: message Layout.fillWidth: true + + // Not a style. Workaround to avoid a 0 width. + Layout.minimumWidth: 20 + backgroundColor: '#E4E4E4' }