From 6d40032fe5c520fcedef1e1f173bb4030c5d87b0 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 24 May 2025 17:27:15 +0800 Subject: internal: use implicit size for wrappers --- modules/dashboard/Wrapper.qml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'modules/dashboard') 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 - } - - } - } -- cgit v1.2.3-freya