1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-08-15 21:49:28 +03:00

mimic ondemand the parabolic effect

--it is used to restore a task after bouncing
for taking users attention and the task
contains also the mouse
This commit is contained in:
Michail Vourlakos
2017-10-28 00:31:10 +03:00
parent 1e2ffb1b23
commit 1eb36ff7de
3 changed files with 13 additions and 1 deletions

View File

@ -212,6 +212,7 @@ Item {
signal showPreviewForTasks(QtObject group);
//trigger updating scaling of neighbour delegates of zoomed delegate
signal updateScale(int delegateIndex, real newScale, real step)
signal mimicEnterForParabolic();
signal publishTasksGeometries();
signal waitingLauncherRemoved(string launch);
signal windowsHovered(variant winIds, bool hovered)

View File

@ -1077,6 +1077,14 @@ MouseArea{
inBlockingAnimation = value;
}
function slotMimicEnterForParabolic(){
if (containsMouse) {
if (!inBlockingAnimation || inAttentionAnimation) {
wrapper.calculateScales(icList.currentSpot);
}
}
}
function slotShowPreviewForTasks(group) {
if (group === mainItemContainer) {
preparePreviewWindow(true);
@ -1211,6 +1219,7 @@ MouseArea{
root.clearZoomSignal.connect(clearZoom);
root.publishTasksGeometries.connect(slotPublishGeometries);
root.showPreviewForTasks.connect(slotShowPreviewForTasks);
root.mimicEnterForParabolic.connect(slotMimicEnterForParabolic);
//startup without launcher
var hideStartup = ((((tasksModel.launcherPosition(mainItemContainer.launcherUrl) == -1)
@ -1237,6 +1246,7 @@ MouseArea{
root.clearZoomSignal.disconnect(clearZoom);
root.publishTasksGeometries.disconnect(slotPublishGeometries);
root.showPreviewForTasks.disconnect(slotShowPreviewForTasks);
root.mimicEnterForParabolic.disconnect(slotMimicEnterForParabolic);
root.updateScale.disconnect(wrapper.signalUpdateScale);
wrapper.sendEndOfNeedBothAxisAnimation();

View File

@ -76,7 +76,8 @@ ParallelAnimation{
if (newWindowAnimation.paused){
newWindowAnimation.stop();
wrapper.calculateScales((root.iconSize+root.iconMargin)/2);
root.mimicEnterForParabolic();
//wrapper.calculateScales((root.iconSize+root.iconMargin)/2);
}
}