Skip to content

Commit c785814

Browse files
xionglinlindeepin-bot[bot]
authored andcommitted
fix: remove white border on icon hover state
Removed the hover state effect that was adding lightness to icons, which caused a white border appearance during hover interactions. The hover state modification was removed while keeping the pressed state effect (lightness -10) intact. This change ensures icons maintain consistent visual appearance across different interaction states without unintended visual artifacts. Log: Fixed icon hover state displaying white border issue Influence: 1. Test icon hover interactions to verify no white border appears 2. Verify pressed state still shows appropriate visual feedback (darker appearance) 3. Check icon rendering consistency across different themes and sizes 4. Test with various icon types to ensure no regressions in visual quality fix: 修复图标悬停状态显示白边问题 移除了图标悬停状态添加亮度的效果,该效果导致悬停交互时出现白边外观。悬停 状态修改已被移除,同时保持按下状态效果(亮度-10)不变。此更改确保图标在 不同交互状态下保持一致的视觉外观,不会出现意外的视觉伪影。 Log: 修复图标悬停状态显示白边问题 Influence: 1. 测试图标悬停交互,验证是否出现白边 2. 验证按下状态是否仍显示适当的视觉反馈(变暗效果) 3. 检查不同主题和尺寸下的图标渲染一致性 4. 测试多种图标类型,确保视觉质量没有回归 PMS: BUG-310087 Change-Id: Id3c2634ba1373c7e26061e2906ef1563801a9bb6
1 parent 5d10663 commit c785814

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/private/dquickimageprovider.cpp

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

@@ -104,14 +104,9 @@ static QImage generateDciIconImage(const QImage &src, DDciIcon::Theme theme, DDc
104104
Q_UNUSED(theme)
105105
qint8 hue = 0, saturation = 0, lightness = 0,
106106
red = 0, green = 0, blue = 0, alpha = 0;
107-
switch (mode) {
108-
case DDciIcon::Hover:
109-
lightness += 10;
110-
break;
111-
case DDciIcon::Pressed:
107+
if (mode == DDciIcon::Pressed) {
112108
lightness -= 10;
113-
break;
114-
default:
109+
} else {
115110
return src;
116111
}
117112

0 commit comments

Comments
 (0)