1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-28 14:05:21 -04:00
Files
DankMaterialShell/quickshell/Widgets/HoverDismissTracker.qml
T
purian23 6bee1b2c86 feat(HoverMode): implement hover popout & launcher functionality in all modes
- New Hover toggle found in DankBar Settings
- New Hover to Reveal Launcher in FrameTab Settings
2026-06-27 22:47:38 -04:00

31 lines
703 B
QML

pragma ComponentBehavior: Bound
import QtQuick
HoverHandler {
id: root
property var shouldDismiss: null
signal dismissRequested
// Emitted on every hover move; passive to avoid blocking overlapping MouseAreas
signal hoverMoved(real gx, real gy)
onPointChanged: {
if (!enabled || !hovered)
return;
const gp = parent.mapToItem(null, point.position.x, point.position.y);
hoverMoved(gp.x, gp.y);
}
onHoveredChanged: {
if (hovered || !enabled)
return;
if (typeof shouldDismiss === "function" && !shouldDismiss())
return;
dismissRequested();
}
function cancelPending() {
}
}