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 {
property string currentNotificationChatId
property bool chatButtonsHovered: false
id: chatLogView
anchors.fill: parent

View File

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

View File

@ -32,7 +32,7 @@ Item {
onHoverChanged: root.isHovered = hovered
anchors.right: parent.right
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
anchors.topMargin: -Style.current.halfPadding
}
@ -68,7 +68,6 @@ Item {
(hasMention ? Style.current.mentionMessageColor : Style.current.transparent)
UserImage {
id: chatImage
anchors.left: parent.left
@ -243,9 +242,6 @@ Item {
root.isHovered = true
}
onExited: {
if (chatLogView.chatButtonsHovered) {
return
}
root.isHovered = false
}
}

View File

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