fix splitbutton menu popout region for clicking outside panel bounds
This commit is contained in:
@@ -46,6 +46,21 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: expanded = false
|
onClicked: expanded = false
|
||||||
|
onExpandedChanged: {
|
||||||
|
const win = QsWindow.window;
|
||||||
|
const contentWin = win as Windows;
|
||||||
|
if (expanded) {
|
||||||
|
contentWin.menuRegion.x = menu.x;
|
||||||
|
contentWin.menuRegion.y = menu.y;
|
||||||
|
contentWin.menuRegion.width = menu.width;
|
||||||
|
contentWin.menuRegion.height = menu.height;
|
||||||
|
} else {
|
||||||
|
contentWin.menuRegion.x = 0;
|
||||||
|
contentWin.menuRegion.y = 0;
|
||||||
|
contentWin.menuRegion.width = 0;
|
||||||
|
contentWin.menuRegion.height = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TransformWatcher {
|
TransformWatcher {
|
||||||
id: watcher
|
id: watcher
|
||||||
|
|||||||
+8
-1
@@ -20,6 +20,7 @@ CustomWindow {
|
|||||||
readonly property alias bar: bar
|
readonly property alias bar: bar
|
||||||
readonly property bool hasFullscreen: Hypr.monitorFor(screen)?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2)
|
readonly property bool hasFullscreen: Hypr.monitorFor(screen)?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2)
|
||||||
readonly property alias interactionWrapper: interactions
|
readonly property alias interactionWrapper: interactions
|
||||||
|
readonly property alias menuRegion: menuPopoutRegion
|
||||||
property var root: Quickshell.shellDir
|
property var root: Quickshell.shellDir
|
||||||
|
|
||||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||||
@@ -46,12 +47,18 @@ CustomWindow {
|
|||||||
visibilities.resources = false;
|
visibilities.resources = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
id: menuPopoutRegion
|
||||||
|
|
||||||
|
intersection: Intersection.Subtract
|
||||||
|
}
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
id: region
|
id: region
|
||||||
|
|
||||||
height: root.height - bar.implicitHeight - Config.barConfig.border
|
height: root.height - bar.implicitHeight - Config.barConfig.border
|
||||||
intersection: Intersection.Xor
|
intersection: Intersection.Xor
|
||||||
regions: popoutRegions.instances
|
regions: [...popoutRegions.instances, menuPopoutRegion]
|
||||||
width: root.width - Config.barConfig.border * 2
|
width: root.width - Config.barConfig.border * 2
|
||||||
x: Config.barConfig.border
|
x: Config.barConfig.border
|
||||||
y: bar.implicitHeight
|
y: bar.implicitHeight
|
||||||
|
|||||||
Reference in New Issue
Block a user