From 3467bd627ce02c5ab41e5b6c37ccccb746d3699e Mon Sep 17 00:00:00 2001 From: zhangkun Date: Mon, 1 Jun 2026 13:55:48 +0800 Subject: [PATCH] refactor(ButtonPanel): remove CicleSpreadAnimation hover effect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 悬停动画效果 --- qt6/src/qml/private/ButtonPanel.qml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/qt6/src/qml/private/ButtonPanel.qml b/qt6/src/qml/private/ButtonPanel.qml index 58446a534..8dd9dfebd 100644 --- a/qt6/src/qml/private/ButtonPanel.qml +++ b/qt6/src/qml/private/ButtonPanel.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: LGPL-3.0-or-later @@ -49,30 +49,4 @@ BoxPanel { GradientStop { position: 0.0; color: control.D.ColorSelector.color1 } GradientStop { position: 0.96; color: control.D.ColorSelector.color2 } } - - CicleSpreadAnimation { - id: hoverAnimation - anchors.fill: parent - visible: enableAnimation - - Rectangle { - anchors.fill: parent - radius: control.radius - // gradient: control.D.ColorSelector.color1 === control.D.ColorSelector.color2 ? null : hoverBackgroundGradient - color: control.D.ColorSelector.color1 - } - function triggle() { - if (button.hovered) { - var pos = D.DTK.cursorPosition() - hoverAnimation.centerPoint = hoverAnimation.mapFromGlobal(pos.x, pos.y) - hoverAnimation.start() - } else { - hoverAnimation.stop() - } - } - - Component.onCompleted: { - button.hoveredChanged.connect(hoverAnimation.triggle) - } - } }