mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-16 07:24:23 +03:00
plasmoid:fix window removal bouncing case
This commit is contained in:
parent
7aa4bff184
commit
50d1e20758
@ -63,7 +63,7 @@ SequentialAnimation {
|
|||||||
|
|
||||||
//trying to fix the ListView nasty behavior
|
//trying to fix the ListView nasty behavior
|
||||||
//during the removal the anchoring for ListView children changes a lot
|
//during the removal the anchoring for ListView children changes a lot
|
||||||
var previousTask = icList.childAtIndex(0/*(taskItem.lastValidIndex-1*/);
|
var previousTask = icList.childAtIndex(taskItem.lastValidIndex-1);
|
||||||
|
|
||||||
if (previousTask !== undefined && !previousTask.isStartup && !previousTask.inBouncingAnimation){
|
if (previousTask !== undefined && !previousTask.isStartup && !previousTask.inBouncingAnimation){
|
||||||
//! When removing a task and there are surrounding separators then the hidden spacers
|
//! When removing a task and there are surrounding separators then the hidden spacers
|
||||||
@ -71,6 +71,8 @@ SequentialAnimation {
|
|||||||
//! the removal animation a small margin must applied
|
//! the removal animation a small margin must applied
|
||||||
var spacer = taskItem.headItemIsSeparator ? -(2+taskItem.metrics.totals.lengthEdge) : ( taskItem.headItemIsSeparator ? (2+taskItem.metrics.totals.lengthEdge)/2 : 0);
|
var spacer = taskItem.headItemIsSeparator ? -(2+taskItem.metrics.totals.lengthEdge) : ( taskItem.headItemIsSeparator ? (2+taskItem.metrics.totals.lengthEdge)/2 : 0);
|
||||||
|
|
||||||
|
if (!taskItem.inBouncingAnimation) {
|
||||||
|
//! real slide-out case
|
||||||
var taskInListPos = mapToItem(icList, 0, 0);
|
var taskInListPos = mapToItem(icList, 0, 0);
|
||||||
taskItem.parent = icList;
|
taskItem.parent = icList;
|
||||||
|
|
||||||
@ -93,6 +95,16 @@ SequentialAnimation {
|
|||||||
taskItem.anchors.bottom = icList.bottom;
|
taskItem.anchors.bottom = icList.bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// bouncing case
|
||||||
|
if (root.vertical) {
|
||||||
|
taskItem.anchors.top = previousTask.bottom;
|
||||||
|
taskItem.anchors.topMargin = spacer;
|
||||||
|
} else {
|
||||||
|
taskItem.anchors.left = previousTask.right;
|
||||||
|
taskItem.anchors.leftMargin = spacer;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log("1." + taskItem.launcherUrl + " - " + tasksModel.launcherInCurrentActivity(taskItem.launcherUrl) + "__" +
|
//console.log("1." + taskItem.launcherUrl + " - " + tasksModel.launcherInCurrentActivity(taskItem.launcherUrl) + "__" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user