dock: coordinated resize animation via centralized reservedWidthAnimated

This commit is contained in:
Damocles 2026-04-28 00:00:56 +02:00
parent 23297d2c4b
commit 41293c02a9
4 changed files with 17 additions and 12 deletions

View file

@ -11,6 +11,19 @@ QtObject {
// Bar, screen corners, etc. read this to adjust layout.
property int reservedWidth: 0
// Animated version for smooth visual transitions.
// Consumers that need coordinated movement use this instead.
property int reservedWidthAnimated: 0
Behavior on reservedWidthAnimated {
NumberAnimation {
duration: 200
easing.type: Easing.InOutCubic
}
}
onReservedWidthChanged: reservedWidthAnimated = reservedWidth
onModeChanged: {
if (mode !== "pinned")
reservedWidth = 0;