internal: use implicit size for wrappers

This commit is contained in:
2 * r + 2 * t 2025-05-24 17:27:15 +08:00
parent 787fde09ef
commit 6d40032fe5
5 changed files with 19 additions and 22 deletions

View file

@ -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
}
}
}

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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
}
}