From d0778b4e9160f02e07b695982ef61dd0df33207f Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 24 Oct 2016 11:23:35 +0200 Subject: [PATCH] fix(Chat/OutgoingMessage): fix placement of `valid` icon --- .../modules/Linphone/Chat/IncomingMessage.qml | 2 +- tests/ui/modules/Linphone/Chat/Message.qml | 8 +++--- .../modules/Linphone/Chat/OutgoingMessage.qml | 26 ++++++++----------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/tests/ui/modules/Linphone/Chat/IncomingMessage.qml b/tests/ui/modules/Linphone/Chat/IncomingMessage.qml index 759b66a6b..1dcc95289 100644 --- a/tests/ui/modules/Linphone/Chat/IncomingMessage.qml +++ b/tests/ui/modules/Linphone/Chat/IncomingMessage.qml @@ -21,7 +21,7 @@ RowLayout { Layout.fillWidth: true // Not a style. Workaround to avoid a 0 width. - Layout.minimumWidth: 0 + Layout.minimumWidth: 20 backgroundColor: '#BFBFBF' } diff --git a/tests/ui/modules/Linphone/Chat/Message.qml b/tests/ui/modules/Linphone/Chat/Message.qml index 472dbacbf..97db806f0 100644 --- a/tests/ui/modules/Linphone/Chat/Message.qml +++ b/tests/ui/modules/Linphone/Chat/Message.qml @@ -25,8 +25,11 @@ Item { Text { id: text - anchors.left: container.left - anchors.right: container.right + anchors { + left: container.left + right: container.right + } + padding: 8 text: $content wrapMode: Text.Wrap @@ -37,7 +40,6 @@ Item { Item { id: content - anchors.left: rectangle.right } } diff --git a/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml b/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml index 736adcf31..70a7748ec 100644 --- a/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml +++ b/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml @@ -1,30 +1,26 @@ import QtQuick 2.7 -import QtQuick.Layouts 1.3 import Common 1.0 import Linphone 1.0 -RowLayout { +Item { implicitHeight: message.height - spacing: 10 + width: parent.width - 16 Message { id: message - Layout.fillWidth: true - - // Not a style. Workaround to avoid a 0 width. - Layout.minimumWidth: 20 + anchors { + left: parent.left + right: parent.right + } backgroundColor: '#E4E4E4' - } - // TODO: Success and re-send icon. - Icon { - Layout.alignment: Qt.AlignTop - Layout.preferredHeight: 16 - Layout.preferredWidth: 16 - - icon: 'valid' + // TODO: Success and re-send icon. + Icon { + iconSize: 16 + icon: 'valid' + } } }