mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-25 19:21:41 +03:00
improve AutoSizer animations signaling
This commit is contained in:
parent
6a558df10b
commit
33aaa85796
@ -44,8 +44,8 @@ Ability {
|
||||
//C7 property int durationTime -> speedFactor.current
|
||||
//C6 property int animationTime -> duration.proposed
|
||||
|
||||
//root.shortDuration -> animations.shortDuration
|
||||
//root.longDuration -> animations.longDuration
|
||||
//C20 root.shortDuration -> animations.shortDuration
|
||||
//C21 root.longDuration -> animations.longDuration
|
||||
|
||||
//parabolic
|
||||
//C3 property int animationStep -> hoverPixelSensitivity
|
||||
|
@ -34,7 +34,8 @@ Ability {
|
||||
&& latteView && latteView.visibility.mode !== LatteCore.Types.SideBar
|
||||
property int iconSize: -1 //it is not set, this is the default
|
||||
|
||||
property bool automaticSizeAnimation: false
|
||||
readonly property bool inCalculatedIconSize: ((container.iconSize === sizer.iconSize) || (container.iconSize === container.maxIconSize))
|
||||
readonly property bool inAutoSizeAnimation: !inCalculatedIconSize
|
||||
|
||||
readonly property int automaticStep: 8
|
||||
readonly property int historyMaxSize: 10
|
||||
@ -50,10 +51,13 @@ Ability {
|
||||
property Item layouts
|
||||
property Item visibility
|
||||
|
||||
onIconSizeChanged: {
|
||||
if (!automaticSizeAnimation) {
|
||||
automaticSizeAnimation = true;
|
||||
|
||||
|
||||
onInAutoSizeAnimationChanged: {
|
||||
if (inAutoSizeAnimation) {
|
||||
animations.needBothAxis.addEvent(sizer);
|
||||
} else {
|
||||
animations.needBothAxis.removeEvent(sizer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,13 +83,6 @@ Ability {
|
||||
sizer.updateIconSize();
|
||||
}
|
||||
}
|
||||
|
||||
onIconSizeChanged: {
|
||||
if (((container.iconSize === sizer.iconSize) || (container.iconSize === container.maxIconSize)) && sizer.automaticSizeAnimation){
|
||||
animations.needBothAxis.removeEvent(sizer);
|
||||
sizer.automaticSizeAnimation=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
Loading…
Reference in New Issue
Block a user