fix(common): add missing appearance properties and fix Revealer content detection

Add default values for sizes.elevationMargin, font.family.numbers, and
font.variableAxes.main to prevent undefined property errors when these
aren't specified in user config.

Fix Revealer widget using contentChildren instead of children, which
caused content items to not be detected properly.
This commit is contained in:
DJ
2025-12-31 19:07:20 -05:00
parent 114f029638
commit 472152801f
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -114,9 +114,14 @@ Singleton {
property int windowRounding: 18
}
property QtObject sizes: QtObject {
property int elevationMargin: 10
}
property QtObject font: QtObject {
property QtObject family: QtObject {
property string main: "sans-serif"
property string numbers: "sans-serif"
property string iconMaterial: "Material Symbols Rounded"
}
property QtObject pixelSize: QtObject {
@@ -125,6 +130,9 @@ Singleton {
property int normal: 16
property int larger: 19
}
property QtObject variableAxes: QtObject {
property var main: ({})
}
}
readonly property QtObject animationCurves: QtObject {
@@ -11,7 +11,7 @@ Item {
clip: true
// Use first child's implicit size instead of childrenRect to avoid animation feedback loop
readonly property Item contentItem: contentChildren.length > 0 ? contentChildren[0] : null
readonly property Item contentItem: children.length > 0 ? children[0] : null
implicitWidth: (reveal || vertical) ? (contentItem?.implicitWidth ?? 0) : 0
implicitHeight: (reveal || !vertical) ? (contentItem?.implicitHeight ?? 0) : 0
visible: reveal || (width > 0 && height > 0)