diff --git a/tests/ui/modules/Linphone/Chat/Chat.qml b/tests/ui/modules/Linphone/Chat/Chat.qml index 10e28507c..c1c9a60af 100644 --- a/tests/ui/modules/Linphone/Chat/Chat.qml +++ b/tests/ui/modules/Linphone/Chat/Chat.qml @@ -188,28 +188,3 @@ ColumnLayout { } } } - - - - // Icons area. - /* Row { */ - /* Layout.alignment: Qt.AlignTop */ - /* Layout.preferredHeight: 30 */ - /* Layout.preferredWidth: 54 */ - /* spacing: 10 */ - - /* Icon { */ - /* anchors.verticalCenter: parent.verticalCenter */ - /* icon: ($type === 'event' && $content) || '' */ - /* iconSize: 16 */ - /* } */ - - /* ActionButton { */ - /* anchors.verticalCenter: parent.verticalCenter */ - /* icon: 'delete' */ - /* iconSize: 16 */ - /* id: removeAction */ - /* onClicked: chat.model.remove(index) */ - /* visible: false */ - /* } */ - /* } */ diff --git a/tests/ui/modules/Linphone/Chat/Event.qml b/tests/ui/modules/Linphone/Chat/Event.qml index 23c29e927..f42da8ffe 100644 --- a/tests/ui/modules/Linphone/Chat/Event.qml +++ b/tests/ui/modules/Linphone/Chat/Event.qml @@ -8,6 +8,7 @@ import Utils 1.0 Row { height: ChatStyle.entry.lineHeight + spacing: ChatStyle.entry.message.extraContent.spacing Icon { height: parent.height @@ -39,4 +40,13 @@ Row { text: qsTr(Utils.snakeToCamel($content)) verticalAlignment: Text.AlignVCenter } + + ActionButton { + height: ChatStyle.entry.lineHeight + icon: 'delete' + iconSize: ChatStyle.entry.deleteIconSize + visible: isHoverEntry() + + onClicked: deleteEntry() + } } diff --git a/tests/ui/modules/Linphone/Chat/IncomingMessage.qml b/tests/ui/modules/Linphone/Chat/IncomingMessage.qml index 22fd7c36e..6f6d9ef15 100644 --- a/tests/ui/modules/Linphone/Chat/IncomingMessage.qml +++ b/tests/ui/modules/Linphone/Chat/IncomingMessage.qml @@ -18,9 +18,9 @@ RowLayout { Avatar { anchors.centerIn: parent + height: ChatStyle.entry.message.incoming.avatarSize username: contact.username - width: ChatStyle.entry.lineHeight - height: ChatStyle.entry.lineHeight + width: ChatStyle.entry.message.incoming.avatarSize } } diff --git a/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml b/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml index f2fbdb698..657fbc689 100644 --- a/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml +++ b/tests/ui/modules/Linphone/Chat/OutgoingMessage.qml @@ -7,17 +7,22 @@ import Linphone.Styles 1.0 // =================================================================== -RowLayout { +Item { implicitHeight: message.height - spacing: 0 + width: parent.width Message { id: message - Layout.fillWidth: true + anchors { + left: parent.left + leftMargin: ChatStyle.entry.metaWidth + right: parent.right + } backgroundColor: ChatStyle.entry.message.outgoing.backgroundColor color: ChatStyle.entry.message.outgoing.text.color fontSize: ChatStyle.entry.message.outgoing.text.fontSize + width: parent.width Row { spacing: ChatStyle.entry.message.extraContent.spacing diff --git a/tests/ui/modules/Linphone/Contact/Avatar.qml b/tests/ui/modules/Linphone/Contact/Avatar.qml index 7387da57a..8edde27e2 100644 --- a/tests/ui/modules/Linphone/Contact/Avatar.qml +++ b/tests/ui/modules/Linphone/Contact/Avatar.qml @@ -43,7 +43,16 @@ Item { Text { anchors.centerIn: parent color: AvatarStyle.initials.color - font.pointSize: AvatarStyle.initials.fontSize + font.pointSize: { + var width + + if (parent.width > 0) { + width = parent.width / AvatarStyle.initials.ratio + } + + return AvatarStyle.initials.fontSize * (width || 1) + } + text: _computeInitials() } diff --git a/tests/ui/modules/Linphone/Styles/ChatStyle.qml b/tests/ui/modules/Linphone/Styles/ChatStyle.qml index 0b04ef36e..44dfdf614 100644 --- a/tests/ui/modules/Linphone/Styles/ChatStyle.qml +++ b/tests/ui/modules/Linphone/Styles/ChatStyle.qml @@ -58,6 +58,7 @@ QtObject { property QtObject incoming: QtObject { property color backgroundColor: '#D0D8DE' + property int avatarSize: 20 property QtObject text: QtObject { property color color: '#595759' diff --git a/tests/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml b/tests/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml index 8cb32bc7a..4e535af68 100644 --- a/tests/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml +++ b/tests/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml @@ -9,6 +9,7 @@ QtObject { property QtObject initials: QtObject { property color color: Colors.k property int fontSize: 10 + property int ratio: 30 } property QtObject mask: QtObject {