mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-30 14:50:12 +03:00
some improvements to hidden spacers
This commit is contained in:
parent
1365d2f444
commit
0c6f9be0e7
@ -379,13 +379,6 @@ Item {
|
||||
if (hasInternalSeparator || root.showWindowsOnlyFromLaunchers) {
|
||||
var i = tasksModel.count - 1;
|
||||
|
||||
//! in case the last task is in deleting phase
|
||||
var task = icList.childAtIndex(i+1);
|
||||
|
||||
if (task) {
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
while (i>=0) {
|
||||
if (!taskIsSeparator(i) && !taskIsForcedHidden(i) ) {
|
||||
return i;
|
||||
|
@ -51,18 +51,23 @@ Item{
|
||||
|
||||
property bool rightSpacer: false
|
||||
|
||||
property real nHiddenSize: {
|
||||
if (isForcedHidden) {
|
||||
return 0;
|
||||
} else if (!inAttentionAnimation && !inMimicParabolicAnimation && !inFastRestoreAnimation) {
|
||||
return (nScale > 0) ? (mainItemContainer.spacersMaxSize * nScale) + separatorSpace : separatorSpace;
|
||||
} else {
|
||||
return (nScale > 0) ? (root.iconSize * nScale) + separatorSpace : separatorSpace;
|
||||
property real nScale: 0
|
||||
property real nHiddenSize: 0
|
||||
|
||||
Binding{
|
||||
target: hiddenSpacer
|
||||
property: "nHiddenSize"
|
||||
value: {
|
||||
if (isForcedHidden) {
|
||||
return 0;
|
||||
} else if (!inAttentionAnimation && !inMimicParabolicAnimation && !inFastRestoreAnimation) {
|
||||
return (nScale > 0) ? (mainItemContainer.spacersMaxSize * nScale) + separatorSpace : separatorSpace;
|
||||
} else {
|
||||
return (nScale > 0) ? (root.iconSize * nScale) + separatorSpace : separatorSpace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property real nScale: 0
|
||||
|
||||
function updateNeighbour() {
|
||||
//index===-1 indicates that this item is removed
|
||||
if (root.editMode) {
|
||||
@ -72,6 +77,10 @@ Item{
|
||||
neighbourSeparator = (mainItemContainer.hasNeighbourSeparator(itemIndex-1, false) && !isSeparator && itemIndex!==parabolicManager.firstRealTaskIndex)
|
||||
|| (latteDock.parabolicManager.isSeparator(latteDock.latteAppletPos-1) && parabolicManager.firstRealTaskIndex === itemIndex);
|
||||
} else {
|
||||
if (itemIndex >= root.tasksCount) {
|
||||
return;
|
||||
}
|
||||
|
||||
neighbourSeparator = (mainItemContainer.hasNeighbourSeparator(itemIndex+1,true) && !isSeparator && itemIndex!==parabolicManager.lastRealTaskIndex)
|
||||
|| (latteDock.parabolicManager.isSeparator(latteDock.latteAppletPos+1) && parabolicManager.lastRealTaskIndex === itemIndex );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user