summaryrefslogtreecommitdiff
path: root/modules/bar/popouts
diff options
context:
space:
mode:
authoroutfoxxed <outfoxxed@outfoxxed.me>2025-06-06 23:26:17 -0700
committeroutfoxxed <outfoxxed@outfoxxed.me>2025-06-06 23:26:17 -0700
commitfc4eff7271e27fac29438cbad8cb865cec7b55a6 (patch)
treeebbd42d1ba820a42063c49ecf598666d5833bb15 /modules/bar/popouts
parentpopouts: fix anim when not shown (diff)
downloadcaelestia-shell-fc4eff7271e27fac29438cbad8cb865cec7b55a6.tar.gz
caelestia-shell-fc4eff7271e27fac29438cbad8cb865cec7b55a6.tar.bz2
caelestia-shell-fc4eff7271e27fac29438cbad8cb865cec7b55a6.zip
popouts: fix multimonitor
Diffstat (limited to 'modules/bar/popouts')
-rw-r--r--modules/bar/popouts/Content.qml20
-rw-r--r--modules/bar/popouts/Wrapper.qml4
2 files changed, 21 insertions, 3 deletions
diff --git a/modules/bar/popouts/Content.qml b/modules/bar/popouts/Content.qml
index a3ddea4..086a558 100644
--- a/modules/bar/popouts/Content.qml
+++ b/modules/bar/popouts/Content.qml
@@ -11,9 +11,23 @@ Item {
required property ShellScreen screen
+ property string currentName
+ property real currentCenter
+ property bool hasCurrent
+
+ Behavior on currentCenter {
+ enabled: root.hasCurrent
+
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.emphasized
+ }
+ }
+
anchors.centerIn: parent
- implicitWidth: Popouts.hasCurrent ? (content.children.find(c => c.shouldBeActive)?.implicitWidth ?? 0) + Appearance.padding.large * 2 : 0
+ implicitWidth: root.hasCurrent ? (content.children.find(c => c.shouldBeActive)?.implicitWidth ?? 0) + Appearance.padding.large * 2 : 0
implicitHeight: (content.children.find(c => c.shouldBeActive)?.implicitHeight ?? 0) + Appearance.padding.large * 2
Item {
@@ -70,7 +84,7 @@ Item {
}
Behavior on implicitHeight {
- enabled: Popouts.hasCurrent
+ enabled: root.hasCurrent
Anim {
easing.bezierCurve: Appearance.anim.curves.emphasized
@@ -81,7 +95,7 @@ Item {
id: popout
required property string name
- property bool shouldBeActive: Popouts.currentName === name
+ property bool shouldBeActive: root.currentName === name
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
diff --git a/modules/bar/popouts/Wrapper.qml b/modules/bar/popouts/Wrapper.qml
index 47b8af2..f304ea7 100644
--- a/modules/bar/popouts/Wrapper.qml
+++ b/modules/bar/popouts/Wrapper.qml
@@ -8,6 +8,10 @@ Item {
required property ShellScreen screen
+ property alias currentName: content.currentName
+ property alias currentCenter: content.currentCenter
+ property alias hasCurrent: content.hasCurrent
+
visible: width > 0 && height > 0
implicitWidth: content.implicitWidth