popouts/tray: better interaction
Not exclusive when on first layer of submenus Closes #610
This commit is contained in:
parent
7e93d558d6
commit
a57dd9343a
4 changed files with 7 additions and 4 deletions
|
|
@ -10,11 +10,13 @@ Item {
|
|||
id: root
|
||||
|
||||
required property Item wrapper
|
||||
readonly property Popout currentPopout: content.children.find(c => c.shouldBeActive) ?? null
|
||||
readonly property Item current: currentPopout?.item ?? null
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
implicitWidth: (content.children.find(c => c.shouldBeActive)?.implicitWidth ?? 0) + Appearance.padding.large * 2
|
||||
implicitHeight: (content.children.find(c => c.shouldBeActive)?.implicitHeight ?? 0) + Appearance.padding.large * 2
|
||||
implicitWidth: (currentPopout?.implicitWidth ?? 0) + Appearance.padding.large * 2
|
||||
implicitHeight: (currentPopout?.implicitHeight ?? 0) + Appearance.padding.large * 2
|
||||
|
||||
Item {
|
||||
id: content
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ StackView {
|
|||
popExit: NoAnim {}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
active: true
|
||||
active: root.depth > 1
|
||||
windows: [QsWindow.window]
|
||||
onCleared: root.popouts.hasCurrent = false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Item {
|
|||
|
||||
readonly property real nonAnimWidth: x > 0 || hasCurrent ? children.find(c => c.shouldBeActive)?.implicitWidth ?? content.implicitWidth : 0
|
||||
readonly property real nonAnimHeight: children.find(c => c.shouldBeActive)?.implicitHeight ?? content.implicitHeight
|
||||
readonly property Item current: content.item?.current ?? null
|
||||
|
||||
property string currentName
|
||||
property real currentCenter
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ CustomMouseArea {
|
|||
if (!utilitiesShortcutActive)
|
||||
visibilities.utilities = false;
|
||||
|
||||
if (!popouts.currentName.startsWith("traymenu"))
|
||||
if (!popouts.currentName.startsWith("traymenu") || popouts.current.depth <= 1)
|
||||
popouts.hasCurrent = false;
|
||||
|
||||
if (Config.bar.showOnHover)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue