Skip to content

fix: remove white border on icon hover state#590

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
xionglinlin:master
Mar 23, 2026
Merged

fix: remove white border on icon hover state#590
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
xionglinlin:master

Conversation

@xionglinlin
Copy link
Contributor

@xionglinlin xionglinlin commented Mar 23, 2026

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

Summary by Sourcery

Adjust icon interaction rendering to remove unintended hover lightening effect while preserving pressed state feedback.

Bug Fixes:

  • Eliminate the hover-induced lightness adjustment that caused a white border around icons during hover interactions.

Enhancements:

  • Update image provider logic to early-return unchanged images for non-pressed icon modes.

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
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 23, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes the lightening effect applied to icons in Hover mode while preserving the darkening effect in Pressed mode, ensuring icon visuals remain unchanged on hover and still provide feedback when pressed.

Flow diagram for generateDciIconImage mode handling after fix

flowchart TD
    A["generateDciIconImage called"] --> B["Initialize hue, saturation, lightness, red, green, blue, alpha to 0"]
    B --> C{mode}
    C -->|DDciIcon_Pressed| D["lightness -= 10"]
    C -->|DDciIcon_Hover_or_other| E["return src"]
    D --> F["Apply adjustments and return modified image"]
    E --> G["Return original src image"]
Loading

File-Level Changes

Change Details Files
Adjust icon rendering logic so only Pressed mode alters lightness and Hover mode returns the original image unchanged.
  • Update the DDciIcon mode handling to remove the lightness increase previously applied for Hover state.
  • Keep the Pressed state behavior that decreases lightness by 10 to provide a darker pressed effect.
  • Return the original source image for any non-Pressed modes, including Hover, to avoid unintended hover artifacts.
  • Refresh the SPDX copyright year range to include 2026.
src/private/dquickimageprovider.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, xionglinlin

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@xionglinlin
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Mar 23, 2026

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit c785814 into linuxdeepin:master Mar 23, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants