diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 17:27:15 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 17:27:15 +0800 |
| commit | 6d40032fe5c520fcedef1e1f173bb4030c5d87b0 (patch) | |
| tree | 7cb5f16592e04f568b17b574de2b8d3cc99de9b9 | |
| parent | dashboard: fix calendar size (diff) | |
| download | caelestia-shell-6d40032fe5c520fcedef1e1f173bb4030c5d87b0.tar.gz caelestia-shell-6d40032fe5c520fcedef1e1f173bb4030c5d87b0.tar.bz2 caelestia-shell-6d40032fe5c520fcedef1e1f173bb4030c5d87b0.zip | |
internal: use implicit size for wrappers
| -rw-r--r-- | modules/dashboard/Wrapper.qml | 25 | ||||
| -rw-r--r-- | modules/launcher/Wrapper.qml | 4 | ||||
| -rw-r--r-- | modules/notifications/Wrapper.qml | 4 | ||||
| -rw-r--r-- | modules/osd/Wrapper.qml | 4 | ||||
| -rw-r--r-- | modules/session/Wrapper.qml | 4 |
5 files changed, 19 insertions, 22 deletions
diff --git a/modules/dashboard/Wrapper.qml b/modules/dashboard/Wrapper.qml index c4388e6..56662e7 100644 --- a/modules/dashboard/Wrapper.qml +++ b/modules/dashboard/Wrapper.qml @@ -9,7 +9,17 @@ Item { visible: height > 0 implicitHeight: 0 - implicitWidth: content.width + BorderConfig.rounding * 2 + implicitWidth: content.implicitWidth + BorderConfig.rounding * 2 + + states: State { + name: "visible" + when: root.visibilities.dashboard + + PropertyChanges { + root.implicitHeight: content.implicitHeight + } + } + transitions: [ Transition { from: "" @@ -22,7 +32,6 @@ Item { easing.type: Easing.BezierSpline easing.bezierCurve: Appearance.anim.curves.emphasizedDecel } - }, Transition { from: "visible" @@ -35,7 +44,6 @@ Item { easing.type: Easing.BezierSpline easing.bezierCurve: Appearance.anim.curves.emphasizedAccel } - } ] @@ -44,15 +52,4 @@ Item { visibilities: root.visibilities } - - states: State { - name: "visible" - when: root.visibilities.dashboard - - PropertyChanges { - root.implicitHeight: content.height - } - - } - } diff --git a/modules/launcher/Wrapper.qml b/modules/launcher/Wrapper.qml index c997781..fb9bb06 100644 --- a/modules/launcher/Wrapper.qml +++ b/modules/launcher/Wrapper.qml @@ -9,14 +9,14 @@ Item { visible: height > 0 implicitHeight: 0 - implicitWidth: content.width + BorderConfig.rounding * 2 + implicitWidth: content.implicitWidth + BorderConfig.rounding * 2 states: State { name: "visible" when: root.visibilities.launcher PropertyChanges { - root.implicitHeight: content.height + root.implicitHeight: content.implicitHeight } } diff --git a/modules/notifications/Wrapper.qml b/modules/notifications/Wrapper.qml index 1ad6092..42f3acb 100644 --- a/modules/notifications/Wrapper.qml +++ b/modules/notifications/Wrapper.qml @@ -9,14 +9,14 @@ Item { visible: height > 0 implicitHeight: 0 - implicitWidth: content.width + BorderConfig.rounding + implicitWidth: content.implicitWidth + BorderConfig.rounding states: State { name: "visible" when: root.visibility PropertyChanges { - root.implicitHeight: content.height + root.implicitHeight: content.implicitHeight } } diff --git a/modules/osd/Wrapper.qml b/modules/osd/Wrapper.qml index 56479ad..22d5f74 100644 --- a/modules/osd/Wrapper.qml +++ b/modules/osd/Wrapper.qml @@ -11,14 +11,14 @@ Item { visible: width > 0 implicitWidth: 0 - implicitHeight: content.height + BorderConfig.rounding * 2 + implicitHeight: content.implicitHeight + BorderConfig.rounding * 2 states: State { name: "visible" when: root.visibility PropertyChanges { - root.implicitWidth: content.width + root.implicitWidth: content.implicitWidth } } diff --git a/modules/session/Wrapper.qml b/modules/session/Wrapper.qml index 4f81d1a..0bf5183 100644 --- a/modules/session/Wrapper.qml +++ b/modules/session/Wrapper.qml @@ -10,14 +10,14 @@ Item { visible: width > 0 implicitWidth: 0 - implicitHeight: content.height + BorderConfig.rounding * 2 + implicitHeight: content.implicitHeight + BorderConfig.rounding * 2 states: State { name: "visible" when: root.visibilities.session PropertyChanges { - root.implicitWidth: content.width + root.implicitWidth: content.implicitWidth } } |