diff options
Diffstat (limited to 'modules/bar/Content.qml')
| -rw-r--r-- | modules/bar/Content.qml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/bar/Content.qml b/modules/bar/Content.qml index ac828f8..7d91076 100644 --- a/modules/bar/Content.qml +++ b/modules/bar/Content.qml @@ -12,6 +12,18 @@ StyledRect { required property ShellScreen screen + function checkPopout(y: real): var { + const aw = activeWindow.child + const awy = activeWindow.y + aw.y + if (y >= awy && y <= awy + aw.implicitHeight) { + Popouts.currentName = "activewindow" + Popouts.currentCenter = Qt.binding(() => activeWindow.y + aw.y + aw.implicitHeight / 2); + Popouts.hasCurrent = true; + } else { + Popouts.hasCurrent = false; + } + } + anchors.top: parent.top anchors.bottom: parent.bottom @@ -21,6 +33,19 @@ StyledRect { Component.onCompleted: Visibilities.bars[screen] = this + MouseArea { + anchors.fill: parent + + hoverEnabled: true + + onPositionChanged: event => root.checkPopout(event.y) + + onContainsMouseChanged: { + if (!containsMouse) + Popouts.hasCurrent = false; + } + } + Item { id: child |