mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-24 12:05:21 -04:00
feat(popouts): implement hover popout functionality
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property bool enabled: false
|
||||
property var shouldDismiss: null
|
||||
|
||||
signal dismissRequested
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
HoverHandler {
|
||||
id: hoverHandler
|
||||
enabled: root.enabled
|
||||
onHoveredChanged: {
|
||||
if (hoverHandler.hovered || !root.enabled)
|
||||
return;
|
||||
if (typeof root.shouldDismiss === "function" && !root.shouldDismiss())
|
||||
return;
|
||||
root.dismissRequested();
|
||||
}
|
||||
}
|
||||
|
||||
function cancelPending() {}
|
||||
}
|
||||
Reference in New Issue
Block a user