mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-28 14:05:21 -04:00
feat(popouts): complete initial hover implementation
This commit is contained in:
@@ -9,12 +9,20 @@ Item {
|
||||
property var shouldDismiss: null
|
||||
|
||||
signal dismissRequested
|
||||
// Emitted on every hover move; passive to avoid blocking overlapping MouseAreas
|
||||
signal hoverMoved(real gx, real gy)
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
HoverHandler {
|
||||
id: hoverHandler
|
||||
enabled: root.enabled
|
||||
onPointChanged: {
|
||||
if (!root.enabled || !hoverHandler.hovered)
|
||||
return;
|
||||
const gp = root.mapToItem(null, hoverHandler.point.position.x, hoverHandler.point.position.y);
|
||||
root.hoverMoved(gp.x, gp.y);
|
||||
}
|
||||
onHoveredChanged: {
|
||||
if (hoverHandler.hovered || !root.enabled)
|
||||
return;
|
||||
@@ -24,5 +32,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
function cancelPending() {}
|
||||
function cancelPending() {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user