fix: fix button alignment and background glitch in compact mode

This commit is contained in:
Jonathan Rainville 2021-02-01 14:05:34 -05:00 committed by Iuri Matias
parent 8a43fffd77
commit c665861820
4 changed files with 2 additions and 10 deletions

View File

@ -31,7 +31,6 @@ ScrollView {
ListView { ListView {
property string currentNotificationChatId property string currentNotificationChatId
property bool chatButtonsHovered: false
id: chatLogView id: chatLogView
anchors.fill: parent anchors.fill: parent

View File

@ -38,11 +38,9 @@ Rectangle {
hoverEnabled: true hoverEnabled: true
onEntered: { onEntered: {
buttonsContainer.hoverChanged(true) buttonsContainer.hoverChanged(true)
chatLogView.chatButtonsHovered = true
} }
onExited: { onExited: {
buttonsContainer.hoverChanged(false) buttonsContainer.hoverChanged(false)
chatLogView.chatButtonsHovered = false
} }
} }
@ -64,7 +62,6 @@ Rectangle {
clickMessage(false, false, false, null, true) clickMessage(false, false, false, null, true)
} }
onHoveredChanged: { onHoveredChanged: {
chatLogView.chatButtonsHovered = this.hovered
buttonsContainer.hoverChanged(this.hovered) buttonsContainer.hoverChanged(this.hovered)
} }
@ -85,7 +82,6 @@ Rectangle {
showReplyArea() showReplyArea()
} }
onHoveredChanged: { onHoveredChanged: {
chatLogView.chatButtonsHovered = this.hovered
buttonsContainer.hoverChanged(this.hovered) buttonsContainer.hoverChanged(this.hovered)
} }

View File

@ -32,7 +32,7 @@ Item {
onHoverChanged: root.isHovered = hovered onHoverChanged: root.isHovered = hovered
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 20 anchors.rightMargin: 20
anchors.top: parent.top anchors.top: messageContainer.top
// This is not exactly like the design because the hover becomes messed up with the buttons on top of another Message // This is not exactly like the design because the hover becomes messed up with the buttons on top of another Message
anchors.topMargin: -Style.current.halfPadding anchors.topMargin: -Style.current.halfPadding
} }
@ -68,7 +68,6 @@ Item {
(hasMention ? Style.current.mentionMessageColor : Style.current.transparent) (hasMention ? Style.current.mentionMessageColor : Style.current.transparent)
UserImage { UserImage {
id: chatImage id: chatImage
anchors.left: parent.left anchors.left: parent.left
@ -243,9 +242,6 @@ Item {
root.isHovered = true root.isHovered = true
} }
onExited: { onExited: {
if (chatLogView.chatButtonsHovered) {
return
}
root.isHovered = false root.isHovered = false
} }
} }

View File

@ -9,6 +9,7 @@ MouseArea {
onClicked: { onClicked: {
if(mouse.button & Qt.RightButton) { if(mouse.button & Qt.RightButton) {
clickMessage(false, isSticker, false); clickMessage(false, isSticker, false);
isMessageActive = true
return; return;
} }
if (mouse.button & Qt.LeftButton) { if (mouse.button & Qt.LeftButton) {