Skip to content

Commit d958989

Browse files
committed
Revert "chore: Reimplement notification animation"
This reverts commit 2f8de93
1 parent 7d34222 commit d958989

File tree

4 files changed

+136
-62
lines changed

4 files changed

+136
-62
lines changed

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
dde-shell (0.0.43) unstable; urgency=medium
2+
3+
* bump version to 0.0.43
4+
5+
-- Deepin Packages Builder <[email protected]> Thu, 29 Aug 2024 10:27:53 +0800
6+
17
dde-shell (0.0.42) unstable; urgency=medium
28

39
* feat: tooltip and preview call to treeland

panels/dock/taskmanager/package/AppItem.qml

Lines changed: 20 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,14 @@ Item {
165165
name: root.iconName
166166
sourceSize: Qt.size(Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE, Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE)
167167
anchors.centerIn: parent
168-
scale: Panel.rootObject.isDragging ? iconScale : iconScale
168+
scale: iconScale
169+
BeatAnimation {
170+
id: beatAnimation
171+
target: icon
172+
baseScale: iconScale
173+
loops: Animation.Infinite
174+
running: root.attention
175+
}
169176

170177
LaunchAnimation {
171178
id: launchAnimation
@@ -197,68 +204,20 @@ Item {
197204
loops: 1
198205
running: false
199206
}
200-
}
201-
202-
// TODO: value can set during debugPanel
203-
Repeater {
204-
model: 5
205-
Rectangle {
206-
id: rect
207-
required property int index
208-
property var originSize: Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE * 1.2 * iconScale
209-
210-
visible: root.attention && !Panel.rootObject.isDragging
211-
width: originSize * (index - 1)
212-
height: width
213-
radius: width / 2
214-
color: Qt.rgba(1, 1, 1, 0.1)
215-
216-
anchors.centerIn: icon
217-
z: -1
218-
opacity: Math.min(3 - width / originSize, blendColorAlpha(D.DTK.themeType === D.ApplicationHelper.DarkType ? 0.25 : 1.0))
219-
220-
function blendColorAlpha(fallback) {
221-
var appearance = DS.applet("org.deepin.ds.dde-appearance")
222-
if (!appearance || appearance.opacity < 0 || appearance.opacity > fallback || appearance.opacity < fallback)
223-
return fallback
224-
return appearance.opacity
225-
}
226-
227-
SequentialAnimation {
228-
running: root.attention && !Panel.rootObject.isDragging
229-
loops: Animation.Infinite
230207

231-
// 弹出
232-
ParallelAnimation {
233-
NumberAnimation { target: rect; property: "width"; from: Math.max(originSize * (index - 1), 0); to: originSize * (index); duration: 1200 }
234-
ColorAnimation { target: rect; property: "color"; from: Qt.rgba(1, 1, 1, 0.4); to: Qt.rgba(1, 1, 1, 0.1); duration: 1200 }
235-
NumberAnimation { target: icon; property: "scale"; from: iconScale; to: iconScale * 1.15; duration: 1200; easing.type: Easing.OutElastic; easing.amplitude: 1; easing.period: 0.2 }
208+
Connections {
209+
target: Panel.rootObject
210+
function onPressedAndDragging(isDragging) {
211+
if (isDragging) {
212+
beatAnimation.stop()
213+
icon.scale = Qt.binding(function() {
214+
return root.iconScale
215+
})
216+
} else {
217+
beatAnimation.running = Qt.binding(function() {
218+
return root.attention
219+
})
236220
}
237-
238-
// 收缩
239-
ParallelAnimation {
240-
NumberAnimation { target: rect; property: "width"; from: originSize * (index); to: originSize * (index + 1); duration: 1200 }
241-
ColorAnimation { target: rect; property: "color"; from: Qt.rgba(1, 1, 1, 0.4); to: Qt.rgba(1, 1, 1, 0.1); duration: 1200 }
242-
NumberAnimation { target: icon; property: "scale"; from: iconScale * 1.15; to: iconScale; duration: 1200; easing.type: Easing.OutElastic; easing.amplitude: 1; easing.period: 0.2 }
243-
}
244-
245-
// 停顿
246-
ParallelAnimation {
247-
NumberAnimation { target: rect; property: "width"; from: originSize * (index + 1); to: originSize * (index + 2); duration: 1200 }
248-
ColorAnimation { target: rect; property: "color"; from: Qt.rgba(1, 1, 1, 0.4); to: Qt.rgba(1, 1, 1, 0.1); duration: 1200 }
249-
}
250-
}
251-
252-
D.BoxShadow {
253-
visible: rect.visible
254-
anchors.fill: rect
255-
z: -2
256-
shadowBlur: 20
257-
shadowColor : Qt.rgba(0, 0, 0, 0.05)
258-
shadowOffsetX : 0
259-
shadowOffsetY : 0
260-
cornerRadius: rect.radius
261-
hollow: true
262221
}
263222
}
264223
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
2+
//
3+
// SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
import QtQuick 2.15
6+
7+
SequentialAnimation {
8+
property Item target: parent
9+
id: root
10+
property real baseScale
11+
12+
PropertyAnimation {
13+
target: root.target
14+
property: "scale"
15+
from: baseScale
16+
to: baseScale
17+
duration: 880
18+
}
19+
20+
PropertyAnimation {
21+
target: root.target
22+
property: "scale"
23+
from: baseScale
24+
to: baseScale * 1.2
25+
duration: 120
26+
}
27+
28+
PropertyAnimation {
29+
target: root.target
30+
property: "scale"
31+
from: baseScale * 1.2
32+
to: baseScale * 1.08
33+
duration: 80
34+
}
35+
36+
PropertyAnimation {
37+
target: root.target
38+
property: "scale"
39+
from: baseScale * 1.08
40+
to: baseScale * 1.16
41+
duration: 120
42+
}
43+
44+
PropertyAnimation {
45+
target: root.target
46+
property: "scale"
47+
from: baseScale * 1.16
48+
to: baseScale * 1.1
49+
duration: 120
50+
}
51+
52+
PropertyAnimation {
53+
target: root.target
54+
property: "scale"
55+
from: baseScale * 1.1
56+
to: baseScale * 1.15
57+
duration: 120
58+
}
59+
60+
PropertyAnimation {
61+
target: root.target
62+
property: "scale"
63+
from: baseScale * 1.15
64+
to: baseScale * 1.12
65+
duration: 120
66+
}
67+
68+
PropertyAnimation {
69+
target: root.target
70+
property: "scale"
71+
from: baseScale * 1.12
72+
to: baseScale * 0.9
73+
duration: 160
74+
}
75+
76+
PropertyAnimation {
77+
target: root.target
78+
property: "scale"
79+
from: baseScale * 0.9
80+
to: baseScale * 1.05
81+
duration: 120
82+
}
83+
84+
PropertyAnimation {
85+
target: root.target
86+
property: "scale"
87+
from: baseScale * 1.05
88+
to: baseScale * 0.95
89+
duration: 120
90+
}
91+
92+
PropertyAnimation {
93+
target: root.target
94+
property: "scale"
95+
from: baseScale * 0.95
96+
to: baseScale * 1
97+
duration: 120
98+
}
99+
100+
PropertyAnimation {
101+
target: root.target
102+
property: "scale"
103+
from: baseScale * 1
104+
to: baseScale * 1
105+
duration: 480
106+
}
107+
108+
onStopped: root.target.scale = baseScale
109+
onFinished: loops = Animation.Infinite
110+
}

panels/dock/taskmanager/package/TaskManager.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ ContainmentItem {
5858
required property string menus
5959
required property list<string> windows
6060
keys: ["text/x-dde-dock-dnd-appid"]
61-
z: attention ? -1 : 0
6261
property bool visibility: itemId !== launcherDndDropArea.launcherDndDesktopId
6362

6463
states: [

0 commit comments

Comments
 (0)