fix one pixel glitch for parabolic effect

--finally after two years I found why there was a glitch
when the parabolic effect was hovering from Task into
an applet and vice versa. Tasks were rounding their
size before exposing it to container. Now this is fixed.
--Drag a task animation is now improved to be a little
more responsive and to inform also its mask requirements
to animations
pull/15/head
Michail Vourlakos 5 years ago
parent 66f8cce6d9
commit 3a347754ea

@ -211,8 +211,11 @@ Item {
}
}
property int tasksHeight: mouseHandler.height
property int tasksWidth: mouseHandler.width
//! Real properties are need in order for parabolic effect to be 1px precise perfect.
//! This way moving from Tasks to Applets and vice versa is pretty stable when hovering with parabolic effect.
property real tasksHeight: mouseHandler.height
property real tasksWidth: mouseHandler.width
//updated from Binding
property int alignment
@ -1132,7 +1135,7 @@ Item {
visible: root.dragAreaEnabled
property int maxSize: ((parabolic.local.lastIndex>=0 || windowPreviewIsShown || animations.hasThicknessAnimation) && !root.dragSource) ?
property int maxSize: (parabolic.local.lastIndex>=0 || windowPreviewIsShown || animations.hasThicknessAnimation) ?
(parabolic.factor.maxZoom * metrics.totals.thickness) + metrics.margin.screenEdge :
metrics.totals.thickness + metrics.margin.screenEdge

@ -657,6 +657,8 @@ Item{
//////////// Transitions //////////////
readonly property string draggingNeedThicknessEvent: taskIcon + "_dragging"
transitions: [
Transition{
id: isDraggedTransition
@ -666,8 +668,8 @@ Item{
SequentialAnimation{
ScriptAction{
script: {
taskItem.animations.needThickness.addEvent(draggingNeedThicknessEvent);
taskItem.inBlockingAnimation = true;
taskItem.parabolic.startRestoreZoomTimer();
taskItem.parabolic.setDirectRenderingEnabled(false);
}
}
@ -675,8 +677,8 @@ Item{
PropertyAnimation {
target: wrapper
property: "mScale"
to: 1 + ((taskItem.parabolic.factor.zoom - 1) / 3)
duration: isDraggedTransition.speed / 2
to: 1
duration: taskItem.parabolic.factor.zoom === 1 ? 0 : (isDraggedTransition.speed*1.2)
easing.type: Easing.OutQuad
}
@ -705,11 +707,19 @@ Item{
easing.type: Easing.OutQuad
}
}
ScriptAction{
script: {
taskItem.animations.needThickness.removeEvent(draggingNeedThicknessEvent);
}
}
}
onRunningChanged: {
if(running){
taskItem.animationStarted();
} else {
taskItem.animations.needThickness.removeEvent(draggingNeedThicknessEvent);
}
}
},

Loading…
Cancel
Save