Skip to content

Commit 0802dd7

Browse files
committed
refactor(ButtonPanel): remove CicleSpreadAnimation hover effect
1. Remove CicleSpreadAnimation and its hover state handler from ButtonPanel 2. Remove Rectangle overlay and trigger function tied to button.hoveredChanged 3. Update copyright year to 2022-2026 Log: Remove CicleSpreadAnimation hover effect from ButtonPanel refactor(ButtonPanel): 移除 CicleSpreadAnimation 悬停动画效果 1. 从 ButtonPanel 中移除 CicleSpreadAnimation 及其悬停状态处理器 2. 移除与 button.hoveredChanged 绑定的 Rectangle 覆盖层和 trigger 函数 3. 更新版权年份至 2022-2026 Log: 从 ButtonPanel 移除 CicleSpreadAnimation 悬停动画效果
1 parent ad644ea commit 0802dd7

1 file changed

Lines changed: 1 addition & 27 deletions

File tree

qt6/src/qml/private/ButtonPanel.qml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: LGPL-3.0-or-later
44

@@ -49,30 +49,4 @@ BoxPanel {
4949
GradientStop { position: 0.0; color: control.D.ColorSelector.color1 }
5050
GradientStop { position: 0.96; color: control.D.ColorSelector.color2 }
5151
}
52-
53-
CicleSpreadAnimation {
54-
id: hoverAnimation
55-
anchors.fill: parent
56-
visible: enableAnimation
57-
58-
Rectangle {
59-
anchors.fill: parent
60-
radius: control.radius
61-
// gradient: control.D.ColorSelector.color1 === control.D.ColorSelector.color2 ? null : hoverBackgroundGradient
62-
color: control.D.ColorSelector.color1
63-
}
64-
function triggle() {
65-
if (button.hovered) {
66-
var pos = D.DTK.cursorPosition()
67-
hoverAnimation.centerPoint = hoverAnimation.mapFromGlobal(pos.x, pos.y)
68-
hoverAnimation.start()
69-
} else {
70-
hoverAnimation.stop()
71-
}
72-
}
73-
74-
Component.onCompleted: {
75-
button.hoveredChanged.connect(hoverAnimation.triggle)
76-
}
77-
}
7852
}

0 commit comments

Comments
 (0)