fix(qt): keep the Qt 6.9 SafeArea/padding API macOS-only

Window.topPadding..rightPadding and the SafeArea attached type are Qt
6.9; on the Linux pin (6.8 LTS) declaring them on the ApplicationWindow
refuses the whole component at Main.qml:173 ("Cannot assign to
non-existent property"), measured on the CI VM 2026-08-25 and on a Pi 4
with Debian 13's Qt 6.8.2. The paddings are now set imperatively from a
Loader active only on macOS, and HeaderBar reads SafeArea.margins.left
through a macOS-only Loader into a plain property, so no binding names
the type on other platforms. Behaviour on macOS is unchanged.

cc
This commit is contained in:
vicrodh committed 2026-08-27 11:11:47 -06:00
1 parent ecc67e0256
commit eada3bd12e
2 files changed
+31 -5

No files matched your search

+13 -1
View File
@@ -100,9 +100,21 @@ Rectangle {
// than the reference's estimate. The 78 stays only as the floor for the
// case where the margin reads 0 (nothing to lose, and it is the number
// the Slint build has used all along).
// `SafeArea` is Qt 6.9 API; the Linux pin is 6.8. The attached read lives
// in a macOS-only Loader so the binding never names the type elsewhere.
property real macSafeLeft: 0
Loader {
active: QbzShell.isMacos
sourceComponent: Component {
Item {
Component.onCompleted:
root.macSafeLeft = Qt.binding(function() { return root.SafeArea.margins.left })
}
}
}
readonly property int chromeLeftInset:
QbzShell.isMacos && !QbzShell.systemTitleBar
? Math.max(root.SafeArea.margins.left, 78)
? Math.max(root.macSafeLeft, 78)
: (root.chromeControls && root.wcOnLeft ? root.wcClusterWidth + 6 : 0)
// The section-nav dropdown (catalog + panel + open/close behaviour).