Compare commits
3 commits
723105382d
...
656e8ccfe7
Author | SHA1 | Date | |
---|---|---|---|
656e8ccfe7 | |||
22930628ae | |||
0d26167ee3 |
3 changed files with 4 additions and 5 deletions
|
@ -19,7 +19,6 @@ PhotoTextsListItem {
|
||||||
primaryText.text: title ? Emoji.emojify(title, Theme.fontSizeMedium) : qsTr("Unknown")
|
primaryText.text: title ? Emoji.emojify(title, Theme.fontSizeMedium) : qsTr("Unknown")
|
||||||
// last user
|
// last user
|
||||||
prologSecondaryText.text: showDraft ? "<i>"+qsTr("Draft")+"</i>" : (is_channel ? "" : ( last_message_sender_id ? ( last_message_sender_id !== ownUserId ? Emoji.emojify(Functions.getUserName(tdLibWrapper.getUserInformation(last_message_sender_id)), Theme.fontSizeExtraSmall) : qsTr("You") ) : "" ))
|
prologSecondaryText.text: showDraft ? "<i>"+qsTr("Draft")+"</i>" : (is_channel ? "" : ( last_message_sender_id ? ( last_message_sender_id !== ownUserId ? Emoji.emojify(Functions.getUserName(tdLibWrapper.getUserInformation(last_message_sender_id)), Theme.fontSizeExtraSmall) : qsTr("You") ) : "" ))
|
||||||
// prologSecondaryText.text: showDraft ? "<i>"+qsTr("Draft")+"</i>" : (is_channel ? "" : ( last_message_sender_id ? ( last_message_sender_id !== ownUserId ? Emoji.emojify(Functions.getUserName(tdLibWrapper.getUserInformation(last_message_sender_id)), Theme.fontSizeExtraSmall) : "" ) : "" ))
|
|
||||||
// last message
|
// last message
|
||||||
secondaryText.text: previewText ? Emoji.emojify(Functions.enhanceHtmlEntities(previewText), Theme.fontSizeExtraSmall) : "<i>" + qsTr("No message in this chat.") + "</i>"
|
secondaryText.text: previewText ? Emoji.emojify(Functions.enhanceHtmlEntities(previewText), Theme.fontSizeExtraSmall) : "<i>" + qsTr("No message in this chat.") + "</i>"
|
||||||
// message date
|
// message date
|
||||||
|
|
|
@ -363,13 +363,13 @@ ListItem {
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: messageListItem.isOwnMessage ? precalculatedValues.pageMarginDouble : 0
|
leftMargin: page.isPrivateChat ? (messageListItem.isOwnMessage ? precalculatedValues.pageMarginDouble : 0) : 0 //левый марджин для собственных сообщений в приватных чатах. В остальных на полную ширину
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
height: messageTextColumn.height + precalculatedValues.paddingMediumDouble
|
height: messageTextColumn.height + precalculatedValues.paddingMediumDouble
|
||||||
width: precalculatedValues.backgroundWidth
|
width: precalculatedValues.backgroundWidth
|
||||||
property bool isUnread: index > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage"
|
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
|
radius: parent.width / 50
|
||||||
opacity: isUnread ? 0.5 : 0.2
|
opacity: isUnread ? 0.5 : 0.2
|
||||||
visible: appSettings.showStickersAsImages || (myMessage.content['@type'] !== "messageSticker" && myMessage.content['@type'] !== "messageAnimatedEmoji")
|
visible: appSettings.showStickersAsImages || (myMessage.content['@type'] !== "messageSticker" && myMessage.content['@type'] !== "messageAnimatedEmoji")
|
||||||
|
|
|
@ -1170,9 +1170,9 @@ Page {
|
||||||
readonly property int profileThumbnailDimensions: showUserInfo ? Theme.itemSizeSmall : 0
|
readonly property int profileThumbnailDimensions: showUserInfo ? Theme.itemSizeSmall : 0
|
||||||
readonly property int pageMarginDouble: 2 * Theme.horizontalPageMargin
|
readonly property int pageMarginDouble: 2 * Theme.horizontalPageMargin
|
||||||
readonly property int paddingMediumDouble: 2 * Theme.paddingMedium
|
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 textItemWidth: entryWidth - profileThumbnailDimensions - Theme.paddingSmall
|
||||||
readonly property int backgroundWidth: page.isChannel ? textItemWidth : textItemWidth - pageMarginDouble
|
readonly property int backgroundWidth: page.isPrivateChat ? textItemWidth - pageMarginDouble : textItemWidth //уменьшенная ширина сообщений для приватных чатов
|
||||||
readonly property int backgroundRadius: textItemWidth/50
|
readonly property int backgroundRadius: textItemWidth/50
|
||||||
readonly property int textColumnWidth: backgroundWidth - Theme.horizontalPageMargin
|
readonly property int textColumnWidth: backgroundWidth - Theme.horizontalPageMargin
|
||||||
readonly property int messageInReplyToHeight: Theme.fontSizeExtraSmall * 2.571428571 + Theme.paddingSmall;
|
readonly property int messageInReplyToHeight: Theme.fontSizeExtraSmall * 2.571428571 + Theme.paddingSmall;
|
||||||
|
|
Loading…
Reference in a new issue