mirror of
https://github.com/KDE/latte-dock.git
synced 2025-08-15 21:49:28 +03:00
update properly onEnter in attention animation
This commit is contained in:
@ -112,7 +112,7 @@ MouseArea{
|
||||
|
||||
property bool pressed: false
|
||||
readonly property bool showAttention: isDemandingAttention && plasmoid.status === PlasmaCore.Types.RequiresAttentionStatus ?
|
||||
true : false
|
||||
true : false
|
||||
|
||||
property int animationTime: root.durationTime * 1.2 * units.shortDuration
|
||||
property int badgeIndicator: 0 //it is used from external apps
|
||||
@ -369,7 +369,7 @@ MouseArea{
|
||||
NumberAnimation { duration: 3 * mainItemContainer.animationTime }
|
||||
}
|
||||
|
||||
/* Rectangle{
|
||||
/* Rectangle{
|
||||
width: !root.vertical ? parent.width : 1
|
||||
height: !root.vertical ? 1 : parent.height
|
||||
x: root.vertical ? parent.width /2 : 0
|
||||
@ -455,7 +455,7 @@ MouseArea{
|
||||
NumberAnimation { duration: 3 * mainItemContainer.animationTime }
|
||||
}
|
||||
|
||||
/* Rectangle{
|
||||
/* Rectangle{
|
||||
width: !root.vertical ? parent.width : 1
|
||||
height: !root.vertical ? 1 : parent.height
|
||||
x: root.vertical ? parent.width /2 : 0
|
||||
@ -577,6 +577,12 @@ MouseArea{
|
||||
|
||||
if((!inAnimation)&&(root.dragSource == null)&&(!root.taskInAnimation) && hoverEnabled){
|
||||
icList.hoveredIndex = index;
|
||||
if (inAttentionAnimation) {
|
||||
var subSpacerScale = (root.zoomFactor-1)/2;
|
||||
hiddenSpacerLeft.nScale = subSpacerScale;
|
||||
hiddenSpacerRight.nScale = subSpacerScale;
|
||||
}
|
||||
|
||||
if (!inBlockingAnimation || inAttentionAnimation) {
|
||||
if (icList.orientation == Qt.Horizontal){
|
||||
icList.currentSpot = mouseX;
|
||||
|
@ -26,7 +26,7 @@ import org.kde.plasma.plasmoid 2.0
|
||||
ParallelAnimation{
|
||||
id: fastRestoreAnimation
|
||||
|
||||
property int speed: 7*mainItemContainer.animationTime
|
||||
property int speed: 5*mainItemContainer.animationTime
|
||||
|
||||
PropertyAnimation {
|
||||
target: wrapper
|
||||
|
@ -32,7 +32,6 @@ SequentialAnimation{
|
||||
property bool isDemandingAttention: (IsDemandingAttention === true)
|
||||
property bool containsMouse: mainItemContainer.containsMouse
|
||||
property bool needsThicknessSent: false //flag to check if the signal for thickness was sent
|
||||
property bool fastRestoreAfterEnd: false
|
||||
|
||||
SequentialAnimation{
|
||||
alwaysRunToEnd: true
|
||||
@ -62,18 +61,6 @@ SequentialAnimation{
|
||||
duration: 3*root.durationTime*newWindowAnimation.speed
|
||||
easing.type: Easing.OutBounce
|
||||
}
|
||||
|
||||
ScriptAction{
|
||||
script:{
|
||||
//if (mainItemContainer.containsMouse) {
|
||||
// newWindowAnimation.stop();
|
||||
// }
|
||||
/*if (!newWindowAnimation.isDemandingAttention
|
||||
|| (plasmoid.status === PlasmaCore.Types.PassiveStatus && newWindowAnimation.loops > 2)){
|
||||
newWindowAnimation.clear();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function clear(){
|
||||
@ -91,11 +78,6 @@ SequentialAnimation{
|
||||
onStopped: {
|
||||
sendEndOfNeedThicknessAnimation();
|
||||
clear();
|
||||
if (fastRestoreAfterEnd) {
|
||||
fastRestoreAfterEnd = false;
|
||||
if (mainItemContainer.containsMouse)
|
||||
fastRestoreAnimation.start();
|
||||
}
|
||||
}
|
||||
|
||||
onIsDemandingAttentionChanged: {
|
||||
|
Reference in New Issue
Block a user