From 731000f4177fa06c81afd9666e800b9d674fe593 Mon Sep 17 00:00:00 2001 From: zhangkun2 Date: Mon, 14 Sep 2026 12:13:51 +0800 Subject: [PATCH] fix: blurry icon during collapse rotation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: parent AppletItemButton sets contentItem.smooth = false in Component.onCompleted to fix static icon blur 2. Fix: add Component.onCompleted in ActionToggleCollapseDelegate to bind contentItem.smooth to rotation angle via Qt.binding 3. smooth=true during rotation (non 0/180 angles) enables bilinear interpolation to eliminate aliasing 4. smooth=false at rest (0/180) preserves original static sharpness fix from parent class Log: Collapse/expand rotation animation no longer blurry Influence: 1. Verify collapse button rotation animation is sharp 2. Verify static icon remains sharp after animation 3. Verify other tray icons unaffected by this change fix: 修复折叠图标旋转过程中模糊问题 1. 根因:父类 AppletItemButton 在 Component.onCompleted 中 设置 contentItem.smooth=false 以修复静止图标模糊 2. 修复:在 ActionToggleCollapseDelegate 新增 Component.onCompleted,将 smooth 绑定为旋转角度函数 3. 旋转中(非0/180度)smooth=true 启用双线性插值消除锯齿 4. 静止时(0/180度)smooth=false 保持原有静止清晰度 Log: 折叠/展开旋转动画不再模糊 Influence: 1. 验证折叠按钮旋转动画过程中图标清晰 2. 验证动画结束后静止图标保持清晰 3. 验证其他托盘图标不受影响 PMS: BUG-368093 --- panels/dock/tray/package/ActionToggleCollapseDelegate.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panels/dock/tray/package/ActionToggleCollapseDelegate.qml b/panels/dock/tray/package/ActionToggleCollapseDelegate.qml index bf1547aa5..6b34c002b 100644 --- a/panels/dock/tray/package/ActionToggleCollapseDelegate.qml +++ b/panels/dock/tray/package/ActionToggleCollapseDelegate.qml @@ -32,6 +32,12 @@ AppletItemButton { toolTip.close() } + Component.onCompleted: { + contentItem.smooth = Qt.binding(function() { + return contentItem.rotation % 180 !== 0; + }); + } + states: [ State { name: "opened"