Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "chore: Reimplement notification animation" #715

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
dde-shell (0.0.43) unstable; urgency=medium

* bump version to 0.0.43

-- Deepin Packages Builder <packages@deepin.org> Thu, 29 Aug 2024 10:27:53 +0800

dde-shell (0.0.42) unstable; urgency=medium

* feat: tooltip and preview call to treeland
Expand Down
81 changes: 20 additions & 61 deletions panels/dock/taskmanager/package/AppItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,14 @@ Item {
name: root.iconName
sourceSize: Qt.size(Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE, Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE)
anchors.centerIn: parent
scale: Panel.rootObject.isDragging ? iconScale : iconScale
scale: iconScale
BeatAnimation {
id: beatAnimation
target: icon
baseScale: iconScale
loops: Animation.Infinite
running: root.attention
}

LaunchAnimation {
id: launchAnimation
Expand Down Expand Up @@ -197,68 +204,20 @@ Item {
loops: 1
running: false
}
}

// TODO: value can set during debugPanel
Repeater {
model: 5
Rectangle {
id: rect
required property int index
property var originSize: Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE * 1.2 * iconScale

visible: root.attention && !Panel.rootObject.isDragging
width: originSize * (index - 1)
height: width
radius: width / 2
color: Qt.rgba(1, 1, 1, 0.1)

anchors.centerIn: icon
z: -1
opacity: Math.min(3 - width / originSize, blendColorAlpha(D.DTK.themeType === D.ApplicationHelper.DarkType ? 0.25 : 1.0))

function blendColorAlpha(fallback) {
var appearance = DS.applet("org.deepin.ds.dde-appearance")
if (!appearance || appearance.opacity < 0 || appearance.opacity > fallback || appearance.opacity < fallback)
return fallback
return appearance.opacity
}

SequentialAnimation {
running: root.attention && !Panel.rootObject.isDragging
loops: Animation.Infinite

// 弹出
ParallelAnimation {
NumberAnimation { target: rect; property: "width"; from: Math.max(originSize * (index - 1), 0); to: originSize * (index); duration: 1200 }
ColorAnimation { target: rect; property: "color"; from: Qt.rgba(1, 1, 1, 0.4); to: Qt.rgba(1, 1, 1, 0.1); duration: 1200 }
NumberAnimation { target: icon; property: "scale"; from: iconScale; to: iconScale * 1.15; duration: 1200; easing.type: Easing.OutElastic; easing.amplitude: 1; easing.period: 0.2 }
Connections {
target: Panel.rootObject
function onPressedAndDragging(isDragging) {
if (isDragging) {
beatAnimation.stop()
icon.scale = Qt.binding(function() {
return root.iconScale
})
} else {
beatAnimation.running = Qt.binding(function() {
return root.attention
})
}

// 收缩
ParallelAnimation {
NumberAnimation { target: rect; property: "width"; from: originSize * (index); to: originSize * (index + 1); duration: 1200 }
ColorAnimation { target: rect; property: "color"; from: Qt.rgba(1, 1, 1, 0.4); to: Qt.rgba(1, 1, 1, 0.1); duration: 1200 }
NumberAnimation { target: icon; property: "scale"; from: iconScale * 1.15; to: iconScale; duration: 1200; easing.type: Easing.OutElastic; easing.amplitude: 1; easing.period: 0.2 }
}

// 停顿
ParallelAnimation {
NumberAnimation { target: rect; property: "width"; from: originSize * (index + 1); to: originSize * (index + 2); duration: 1200 }
ColorAnimation { target: rect; property: "color"; from: Qt.rgba(1, 1, 1, 0.4); to: Qt.rgba(1, 1, 1, 0.1); duration: 1200 }
}
}

D.BoxShadow {
visible: rect.visible
anchors.fill: rect
z: -2
shadowBlur: 20
shadowColor : Qt.rgba(0, 0, 0, 0.05)
shadowOffsetX : 0
shadowOffsetY : 0
cornerRadius: rect.radius
hollow: true
}
}
}
Expand Down
110 changes: 110 additions & 0 deletions panels/dock/taskmanager/package/BeatAnimation.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

import QtQuick 2.15

SequentialAnimation {
property Item target: parent
id: root
property real baseScale

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale
to: baseScale
duration: 880
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale
to: baseScale * 1.2
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1.2
to: baseScale * 1.08
duration: 80
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1.08
to: baseScale * 1.16
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1.16
to: baseScale * 1.1
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1.1
to: baseScale * 1.15
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1.15
to: baseScale * 1.12
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1.12
to: baseScale * 0.9
duration: 160
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 0.9
to: baseScale * 1.05
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1.05
to: baseScale * 0.95
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 0.95
to: baseScale * 1
duration: 120
}

PropertyAnimation {
target: root.target
property: "scale"
from: baseScale * 1
to: baseScale * 1
duration: 480
}

onStopped: root.target.scale = baseScale
onFinished: loops = Animation.Infinite
}
1 change: 0 additions & 1 deletion panels/dock/taskmanager/package/TaskManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ ContainmentItem {
required property string menus
required property list<string> windows
keys: ["text/x-dde-dock-dnd-appid"]
z: attention ? -1 : 0
property bool visibility: itemId !== launcherDndDropArea.launcherDndDesktopId

states: [
Expand Down
Loading