mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-15 15:45:20 -04:00
29 lines
572 B
QML
29 lines
572 B
QML
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() {}
|
|
}
|