From 22930628aeb0ec648606978502e5d6f722c12b1b Mon Sep 17 00:00:00 2001 From: Denis Fedoseev Date: Wed, 12 Jul 2023 01:12:53 +0300 Subject: [PATCH] wide message without left margin --- qml/components/MessageListViewItem.qml | 5 +++-- qml/pages/ChatPage.qml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml index 9a0c86a..b2f62af 100644 --- a/qml/components/MessageListViewItem.qml +++ b/qml/components/MessageListViewItem.qml @@ -363,14 +363,15 @@ ListItem { anchors { left: parent.left -// leftMargin: messageListItem.isOwnMessage ? precalculatedValues.pageMarginDouble : 0 leftMargin: 0 +// leftMargin: messageListItem.isOwnMessage ? precalculatedValues.pageMarginDouble : 0 +// leftMargin: precalculatedValues.showUserInfo ? (messageListItem.isOwnMessage ? precalculatedValues.pageMarginDouble : 0) : 0 verticalCenter: parent.verticalCenter } height: messageTextColumn.height + precalculatedValues.paddingMediumDouble width: precalculatedValues.backgroundWidth property bool isUnread: index > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage" - color: Theme.colorScheme === Theme.LightOnDark ? (isUnread ? Theme.secondaryHighlightColor : Theme.secondaryColor) : (isUnread ? Theme.backgroundGlowColor : Theme.overlayBackgroundColor) + color: Theme.colorScheme === Theme.LightOnDark ? (isOwnMessage ? Theme.highlightBackgroundColor : (isUnread ? Theme.secondaryHighlightColor : Theme.secondaryColor)) : (isOwnMessage ? Theme.highlightBackgroundColor : (isUnread ? Theme.backgroundGlowColor : Theme.overlayBackgroundColor)) radius: parent.width / 50 opacity: isUnread ? 0.5 : 0.2 visible: appSettings.showStickersAsImages || (myMessage.content['@type'] !== "messageSticker" && myMessage.content['@type'] !== "messageAnimatedEmoji") diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml index acfec79..3f2c720 100644 --- a/qml/pages/ChatPage.qml +++ b/qml/pages/ChatPage.qml @@ -1170,9 +1170,10 @@ Page { readonly property int profileThumbnailDimensions: showUserInfo ? Theme.itemSizeSmall : 0 readonly property int pageMarginDouble: 2 * Theme.horizontalPageMargin readonly property int paddingMediumDouble: 2 * Theme.paddingMedium - readonly property int entryWidth: chatView.width - pageMarginDouble + readonly property int entryWidth: chatView.width - pageMarginDouble //ширина полной строки сообщения вместе с аватаркой readonly property int textItemWidth: entryWidth - profileThumbnailDimensions - Theme.paddingSmall - readonly property int backgroundWidth: page.isChannel ? textItemWidth : textItemWidth - pageMarginDouble +// readonly property int backgroundWidth: page.isChannel ? textItemWidth : textItemWidth - pageMarginDouble //ширина бэкграунда для канала/обычного чата + readonly property int backgroundWidth: textItemWidth //ширина бэкграунда для канала/обычного чата readonly property int backgroundRadius: textItemWidth/50 readonly property int textColumnWidth: backgroundWidth - Theme.horizontalPageMargin readonly property int messageInReplyToHeight: Theme.fontSizeExtraSmall * 2.571428571 + Theme.paddingSmall;