dock: coordinated resize animation via centralized reservedWidthAnimated
This commit is contained in:
parent
23297d2c4b
commit
41293c02a9
4 changed files with 17 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue