1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-30 14:50:12 +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 cc5fcf9846
commit 3bf3141614

View File

@ -190,10 +190,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
@ -227,21 +228,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)