mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-28 14:05:21 -04:00
feat(popouts): enhance hover functionality and introduce hover dismiss features
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
|
||||
HoverHandler {
|
||||
id: root
|
||||
|
||||
required property var controller
|
||||
property bool trackingEnabled: false
|
||||
|
||||
enabled: trackingEnabled
|
||||
|
||||
onTrackingEnabledChanged: {
|
||||
if (!trackingEnabled)
|
||||
controller.updateBodyHover(false);
|
||||
}
|
||||
|
||||
onHoveredChanged: controller.updateBodyHover(hovered)
|
||||
onPointChanged: {
|
||||
if (!hovered)
|
||||
return;
|
||||
const gp = parent.mapToItem(null, point.position.x, point.position.y);
|
||||
controller.updateCursor(gp.x, gp.y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user