From 60deb9287d4929b3ca47778f4d49b23d448e99d0 Mon Sep 17 00:00:00 2001 From: wjyrich <1071633242@qq.com> Date: Wed, 16 Apr 2025 13:17:54 +0800 Subject: [PATCH] fix: The icons residing on pannel move from the right side to the left side. set a flag for NumberAnimation. pms: BUG-309403 --- panels/dock/package/main.qml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/panels/dock/package/main.qml b/panels/dock/package/main.qml index 8d627f690..5c198c30b 100644 --- a/panels/dock/package/main.qml +++ b/panels/dock/package/main.qml @@ -347,8 +347,21 @@ Window { Layout.topMargin: useColumnLayout && Panel.itemAlignment === Dock.CenterAlignment ? (dock.height - dockCenterPart.implicitHeight) / 2 - (dockLeftPart.implicitHeight + 20) + Math.min((dock.height - dockCenterPart.implicitHeight) / 2 - (dockRightPart.implicitHeight + 20), 0) : 0 - Behavior on Layout.leftMargin { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } } - Behavior on Layout.topMargin { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } } + Behavior on Layout.leftMargin { + enabled: !dock.isDragging + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + + Behavior on Layout.topMargin { + enabled: !dock.isDragging + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } OverflowContainer { id: centerLoader