From c6fd199bd716cb491fce3cd14db42711f41585b0 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sat, 25 Apr 2026 21:55:38 +0200 Subject: [PATCH] dock: animate bar width change, extend dock to top of screen --- shell/dock/AppletDock.qml | 3 +++ shell/modules/Bar.qml | 8 ++++++++ test/qmllint-baseline.txt | 3 +++ 3 files changed, 14 insertions(+) diff --git a/shell/dock/AppletDock.qml b/shell/dock/AppletDock.qml index 1c770fe..e445059 100644 --- a/shell/dock/AppletDock.qml +++ b/shell/dock/AppletDock.qml @@ -25,6 +25,9 @@ PanelWindow { anchors.right: true anchors.bottom: true + // Counteract the bar's exclusive zone so the dock extends to the top of the screen + margins.top: -S.Theme.barHeight + readonly property int _dockWidth: S.Modules.dock.width ?? 300 readonly property var _applets: S.Modules.dock.applets ?? {} readonly property color _accent: S.Theme.base0C diff --git a/shell/modules/Bar.qml b/shell/modules/Bar.qml index a354cfe..3ef5314 100644 --- a/shell/modules/Bar.qml +++ b/shell/modules/Bar.qml @@ -21,6 +21,14 @@ PanelWindow { margins.right: S.DockState.reservedWidth + Behavior on margins.right { + enabled: !S.Theme.reducedMotion + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + implicitHeight: S.Theme.barHeight exclusiveZone: implicitHeight diff --git a/test/qmllint-baseline.txt b/test/qmllint-baseline.txt index e3d318b..83b42c3 100644 --- a/test/qmllint-baseline.txt +++ b/test/qmllint-baseline.txt @@ -17,8 +17,11 @@ shell/applets/NotifApplet.qml: Unqualified access [unqualified] shell/applets/PowerApplet.qml: Unqualified access [unqualified] shell/applets/TemperatureApplet.qml: Unqualified access [unqualified] shell/applets/VolumeApplet.qml: Unqualified access [unqualified] +shell/dock/AppletDock.qml: Could not find property "top". [missing-property] shell/dock/AppletDock.qml: Member "expanded" not found on type "QQuickItem" [missing-property] +shell/dock/AppletDock.qml: Type margins is used but it is not resolved [unresolved-type] shell/dock/AppletDock.qml: Type PanelWindow is not creatable. [uncreatable-type] +shell/dock/AppletDock.qml: unknown grouped property scope margins. [unqualified] shell/dock/DockEdgeTrigger.qml: Type PanelWindow is not creatable. [uncreatable-type] shell/lock/LockAuth.qml: Unqualified access [unqualified] shell/lock/Lock.qml: Unqualified access [unqualified]