From a9cae5b96e54f11f47fc5750f461f37154cf82cd Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 7 Apr 2021 09:59:42 -0400 Subject: [PATCH] fix: fix compact message hover when a popup is opened Fixes #2187 --- .../Chat/ChatColumn/MessageComponents/CompactMessage.qml | 2 +- ui/app/AppMain.qml | 1 + ui/main.qml | 1 + ui/shared/ModalPopup.qml | 6 ++++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml index cebdd3f1a1..091848583d 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml @@ -241,7 +241,7 @@ Item { } HoverHandler { - enabled: !messageContextMenu.opened && !profilePopupOpened + enabled: !messageContextMenu.opened && !profilePopupOpened && !popupOpened onHoveredChanged: { root.isHovered = hovered; } diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index f829d3c440..925ede5b92 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -16,6 +16,7 @@ import Qt.labs.settings 1.0 RowLayout { id: appMain property int currentView: sLayout.currentIndex + property bool popupOpened: false spacing: 0 Layout.fillHeight: true Layout.fillWidth: true diff --git a/ui/main.qml b/ui/main.qml index d25dbe6fe8..ba3495d160 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -19,6 +19,7 @@ ApplicationWindow { property bool hasAccounts: !!loginModel.rowCount() property bool removeMnemonicAfterLogin: false property alias dragAndDrop: dragTarget + property bool popupOpened: false Universal.theme: Universal.System diff --git a/ui/shared/ModalPopup.qml b/ui/shared/ModalPopup.qml index f641474b87..7c8a7056cb 100644 --- a/ui/shared/ModalPopup.qml +++ b/ui/shared/ModalPopup.qml @@ -28,6 +28,12 @@ Popup { color: Style.current.background radius: 8 } + onOpened: { + popupOpened = true + } + onClosed: { + popupOpened = false + } padding: 0 contentItem: Item {