1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 04:58:30 -04:00

fix(Hover): refactor & update hover tracking w/context menus

Fixes #2737
This commit is contained in:
purian23
2026-07-04 00:08:58 -04:00
parent 2861cc89c6
commit c554d973ef
30 changed files with 297 additions and 27 deletions
@@ -17,9 +17,21 @@ Rectangle {
property bool isSticky: false
property bool popupAbove: false
property Item popupAboveItem: null
property var transientSurfaceTracker: null
signal viewModeToggled
Component.onDestruction: transientSurfaceTracker?.unregister(root)
Connections {
target: root.transientSurfaceTracker
ignoreUnknownSignals: true
function onCloseRequested() {
categoryPopup.close();
}
}
width: parent?.width ?? 200
height: 32
color: isSticky ? Theme.withAlpha(Theme.surfaceHover, 0) : (hoverArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.surfaceHover, 0))
@@ -142,6 +154,8 @@ Rectangle {
dim: false
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
onVisibleChanged: root.transientSurfaceTracker?.setActive(root, visible, null)
background: Rectangle {
color: "transparent"
}