From 0f1d0f336eb0572b9b1f622dcdab9892de5f2a7b Mon Sep 17 00:00:00 2001 From: miruka Date: Wed, 22 Jul 2020 00:04:12 -0400 Subject: [PATCH] Don't show avatar tooltips when context menu open --- TODO.md | 3 --- src/gui/Base/HAvatar.qml | 10 ++++++---- src/gui/Window.qml | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/TODO.md b/TODO.md index 787daa3f..00f00db6 100644 --- a/TODO.md +++ b/TODO.md @@ -3,9 +3,6 @@ - Image viewer: - hflickable: support kinetic scrolling disabler -- Avatar tooltip can get displayed in front of presence menu -- Use loading cursorShape - - global presence control - fix members not synced bug diff --git a/src/gui/Base/HAvatar.qml b/src/gui/Base/HAvatar.qml index cebcb662..e60cde74 100644 --- a/src/gui/Base/HAvatar.qml +++ b/src/gui/Base/HAvatar.qml @@ -82,10 +82,12 @@ Rectangle { background.border.width * 2, ) - visible: ! avatarImage.broken && - avatarImage.width < dimension * 0.75 && - (toolTipSourceOverride || toolTipMxc) && - hoverHandler.hovered + visible: + ! avatarImage.broken && + ! window.anyMenu && + avatarImage.width < dimension * 0.75 && + (toolTipSourceOverride || toolTipMxc) && + hoverHandler.hovered delay: 1000 backgroundColor: theme.controls.avatar.hoveredImage.background diff --git a/src/gui/Window.qml b/src/gui/Window.qml index 1ab46015..7b5e997f 100644 --- a/src/gui/Window.qml +++ b/src/gui/Window.qml @@ -28,9 +28,9 @@ ApplicationWindow { readonly property var visibleMenus: ({}) readonly property var visiblePopups: ({}) - readonly property bool anyPopupOrMenu: - Object.keys(window.visibleMenus).length > 0 || - Object.keys(window.visiblePopups).length > 0 + readonly property bool anyMenu: Object.keys(visibleMenus).length > 0 + readonly property bool anyPopup: Object.keys(visiblePopups).length > 0 + readonly property bool anyPopupOrMenu: anyMenu || anyPopup function saveState(obj) {