From 823042b24538eba0423f1a1ef07277fd0e0fec6b Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Sat, 22 Nov 2025 00:30:26 -0500 Subject: [PATCH] Panels: properly animate height with vertical bar + Bluetooth sizing refinement. --- Modules/MainScreen/PanelPlaceholder.qml | 6 +----- Modules/Panels/Bluetooth/BluetoothPanel.qml | 8 +++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Modules/MainScreen/PanelPlaceholder.qml b/Modules/MainScreen/PanelPlaceholder.qml index 9782a0047..fedc49345 100644 --- a/Modules/MainScreen/PanelPlaceholder.qml +++ b/Modules/MainScreen/PanelPlaceholder.qml @@ -615,11 +615,7 @@ Item { Behavior on height { NumberAnimation { - duration: { - if (!panelBackground.shouldAnimateHeight) - return 0; - return root.isClosing ? Style.animationFast : Style.animationNormal; - } + duration: root.isClosing ? Style.animationFast : Style.animationNormal easing.type: Easing.BezierSpline easing.bezierCurve: panelBackground.bezierCurve } diff --git a/Modules/Panels/Bluetooth/BluetoothPanel.qml b/Modules/Panels/Bluetooth/BluetoothPanel.qml index 9785f092b..01855e112 100644 --- a/Modules/Panels/Bluetooth/BluetoothPanel.qml +++ b/Modules/Panels/Bluetooth/BluetoothPanel.qml @@ -18,7 +18,11 @@ SmartPanel { panelContent: Rectangle { color: Color.transparent - property real contentPreferredHeight: !(BluetoothService.adapter && BluetoothService.adapter.enabled) ? Math.min(preferredHeight, Math.max(280 * Style.uiScaleRatio, mainColumn.implicitHeight + Style.marginL * 2)) : (mainColumn.implicitHeight + Style.marginL * 2) + // Calculate content height based on header + devices list (or minimum for empty states) + property real headerHeight: headerRow.implicitHeight + Style.marginM * 2 + property real devicesHeight: devicesList.implicitHeight + property real calculatedHeight: headerHeight + devicesHeight + Style.marginL * 2 + Style.marginM + property real contentPreferredHeight: (BluetoothService.adapter && BluetoothService.adapter.enabled) ? Math.min(root.preferredHeight, Math.max(280 * Style.uiScaleRatio, calculatedHeight)) : Math.min(root.preferredHeight, 280 * Style.uiScaleRatio) ColumnLayout { id: mainColumn @@ -83,6 +87,7 @@ SmartPanel { // Adapter not available of disabled NBox { + id: disabledBox visible: !(BluetoothService.adapter && BluetoothService.adapter.enabled) Layout.fillWidth: true Layout.fillHeight: true @@ -135,6 +140,7 @@ SmartPanel { contentWidth: availableWidth ColumnLayout { + id: devicesList width: parent.width spacing: Style.marginM