1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-24 17:33:50 +03:00

dont break Task.IconItem size calculations startup

--remove no-needed anchors changes state for Task.IconItem
and at the same time fix the size calculations for IconItem.
There were cases for Views that did not use the parabolic effect
at all and Tasks contained single windows tasks (that did not
have launchers assigned), these specific tasks were
appearing at minimum icon size 16px. even though the user
had set much greater values.
This commit is contained in:
Michail Vourlakos 2020-01-30 18:45:09 +02:00
parent bc2e070960
commit ebd749fd00

View File

@ -193,10 +193,11 @@ Item{
root.iconSize * wrapper.mScale
property real newTempSize: {
if (wrapper.opacity == 1)
return Math.min(basicScalingWidth, basicScalingHeight)
else
return Math.max(basicScalingWidth, basicScalingHeight)
if (wrapper.opacity === 1 ) {
return Math.min(basicScalingWidth, basicScalingHeight);
} else {
return Math.max(basicScalingWidth, basicScalingHeight);
}
}
//! Latte Side Painting-style if the user chose it
@ -230,21 +231,6 @@ Item{
}
},
State{
name: "inAddRemoveAnimation"
when: taskItem.inAddRemoveAnimation
AnchorChanges{
target:iconImageBuffer;
anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined;
anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined;
anchors.right: root.position === PlasmaCore.Types.LeftPositioned ? parent.right : undefined;
anchors.left: root.position === PlasmaCore.Types.RightPositioned ? parent.left : undefined;
anchors.top: root.position === PlasmaCore.Types.BottomPositioned ? parent.top : undefined;
anchors.bottom: root.position === PlasmaCore.Types.TopPositioned ? parent.bottom : undefined;
}
},
State{
name: "animating"
when: !taskItem.inAddRemoveAnimation && (launcherAnimation.running || newWindowAnimation.running || fastRestoreAnimation.running)