Skip to content

Commit f9ea48b

Browse files
committed
fix(ButtonPanel): add hasAnimation check to enableAnimation property
1. Added D.DTK.hasAnimation guard to the enableAnimation condition in ButtonPanel 2. Prevents animation from being enabled when the system or theme does not support it Log: Add hasAnimation check to ButtonPanel enableAnimation to respect system animation settings fix(ButtonPanel): 为 enableAnimation 属性添加 hasAnimation 检查 1. 在 ButtonPanel 的 enableAnimation 条件中添加 D.DTK.hasAnimation 守卫 2. 当系统或主题不支持动画时,避免启用动画 Log: 为 ButtonPanel 的 enableAnimation 添加 hasAnimation 检查,以遵循系统动画设置
1 parent ad644ea commit f9ea48b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

qt6/src/qml/private/ButtonPanel.qml

Lines changed: 2 additions & 2 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

@@ -11,7 +11,7 @@ BoxPanel {
1111
id: control
1212
property Item button
1313

14-
property bool enableAnimation: control.D.ColorSelector.controlState === D.DTK.HoveredState && control.D.ColorSelector.family === D.Palette.CommonColor
14+
property bool enableAnimation: D.DTK.hasAnimation && control.D.ColorSelector.controlState === D.DTK.HoveredState && control.D.ColorSelector.family === D.Palette.CommonColor
1515
color1: selectValue(DS.Style.button.background1, DS.Style.checkedButton.background, DS.Style.highlightedButton.background1)
1616
color2: selectValue(DS.Style.button.background2, DS.Style.checkedButton.background, DS.Style.highlightedButton.background2)
1717
insideBorderColor: selectValue(DS.Style.button.insideBorder, null, DS.Style.highlightedButton.border)

0 commit comments

Comments
 (0)