mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-12 01:17:55 +03:00
protect hidden spacers on removing animation
--the remove task animation is more stable now
This commit is contained in:
parent
ee48e70e30
commit
b94f2c948f
@ -287,8 +287,10 @@ MouseArea{
|
||||
visible: (index === 0) || (separatorSpace > 0)
|
||||
|
||||
property bool neighbourSeparator: false
|
||||
//in case there is a neighbour separator
|
||||
property int separatorSpace: ((parabolicManager.internalSeparatorPos !== -1 && parabolicManager.internalSeparatorPos === index-1)
|
||||
//in case there is a neighbour separator, lastValidIndex is used in order to protect from false
|
||||
//when the task is removed
|
||||
property int indexUsed: index === -1 ? lastValidIndex : index
|
||||
property int separatorSpace: ((parabolicManager.internalSeparatorPos !== -1 && parabolicManager.internalSeparatorPos === indexUsed-1)
|
||||
|| neighbourSeparator) && !isSeparator ?
|
||||
(2+root.iconMargin/2) : 0
|
||||
|
||||
@ -352,8 +354,10 @@ MouseArea{
|
||||
visible: (index === icList.count - 1) || (separatorSpace > 0)
|
||||
|
||||
property bool neighbourSeparator: false
|
||||
//in case there is a neighbour separator
|
||||
property int separatorSpace: ((parabolicManager.internalSeparatorPos !== -1 && parabolicManager.internalSeparatorPos === index+1)
|
||||
//in case there is a neighbour separator, lastValidIndex is used in order to protect from false
|
||||
//when the task is removed
|
||||
property int indexUsed: index === -1 ? lastValidIndex : index
|
||||
property int separatorSpace: ((parabolicManager.internalSeparatorPos !== -1 && parabolicManager.internalSeparatorPos === indexUsed+1)
|
||||
|| neighbourSeparator) && !isSeparator ?
|
||||
(2+root.iconMargin/2) : 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user