summaryrefslogtreecommitdiff
path: root/modules/bar/popouts/Content.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-07 16:38:10 +1000
committerGitHub <noreply@github.com>2025-06-07 16:38:10 +1000
commit5dfb3c43edffb9348aa1e3c5ccdfcf51f0dc4346 (patch)
treeebbd42d1ba820a42063c49ecf598666d5833bb15 /modules/bar/popouts/Content.qml
parentpopouts: fix anim when not shown (diff)
parentpopouts: fix multimonitor (diff)
downloadcaelestia-shell-5dfb3c43edffb9348aa1e3c5ccdfcf51f0dc4346.tar.gz
caelestia-shell-5dfb3c43edffb9348aa1e3c5ccdfcf51f0dc4346.tar.bz2
caelestia-shell-5dfb3c43edffb9348aa1e3c5ccdfcf51f0dc4346.zip
Merge pull request #2 from outfoxxed/popouts-multimon
popouts: fix multimonitor
Diffstat (limited to 'modules/bar/popouts/Content.qml')
-rw-r--r--modules/bar/popouts/Content.qml20
1 files changed, 17 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