mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-28 14:05:21 -04:00
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
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user