From f5dea4b3b887d7e981ffb01011d61e22a9c355f3 Mon Sep 17 00:00:00 2001 From: xionglinlin Date: Mon, 23 Mar 2026 15:26:25 +0800 Subject: [PATCH] fix: remove white border on icon hover state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/private/dquickimageprovider.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/private/dquickimageprovider.cpp b/src/private/dquickimageprovider.cpp index 3c5010d9..c2607ed5 100644 --- a/src/private/dquickimageprovider.cpp +++ b/src/private/dquickimageprovider.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: LGPL-3.0-or-later @@ -104,14 +104,9 @@ static QImage generateDciIconImage(const QImage &src, DDciIcon::Theme theme, DDc Q_UNUSED(theme) qint8 hue = 0, saturation = 0, lightness = 0, red = 0, green = 0, blue = 0, alpha = 0; - switch (mode) { - case DDciIcon::Hover: - lightness += 10; - break; - case DDciIcon::Pressed: + if (mode == DDciIcon::Pressed) { lightness -= 10; - break; - default: + } else { return src; }