Skip to content

fix(dock): fix hover bottom border invisible for non-active app items#1622

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Ivy233:fix/dock-nonactive-hover-border
Jun 8, 2026
Merged

fix(dock): fix hover bottom border invisible for non-active app items#1622
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Ivy233:fix/dock-nonactive-hover-border

Conversation

@Ivy233

@Ivy233 Ivy233 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

When AppItemBackground overrides outsideBorderColor from the base class, the hovered state was incorrectly set to :normal, causing non-active app items to use the normal color (transparent) on hover - making the bottom border completely invisible. Unify outsideBorderColor with the same palette definition as activeOutsideBorderColor to ensure hover state has dedicated visible color values.

AppItemBackground子类覆盖基类outsideBorderColor时,hovered状态 错误地设为:normal,导致非活跃应用的hover底边使用normal色
(transparent)而完全不可见。将outsideBorderColor统一为与
activeOutsideBorderColor相同的完整palette定义,使hover态有独立的 可见颜色值。

Log: 修复任务栏非活跃应用hover底边描边不可见的问题
PMS: BUG-364205
Influence: 仅影响任务栏应用图标hover底边效果,非活跃应用hover时底边描边恢复正常显示,不影响托盘等其他组件。

Summary by Sourcery

Bug Fixes:

  • Restore visible bottom border on hover for non-active dock app items by providing specific hovered and pressed outside border colors.

When AppItemBackground overrides outsideBorderColor from the base class,
the hovered state was incorrectly set to :normal, causing non-active
app items to use the normal color (transparent) on hover - making the
bottom border completely invisible. Unify outsideBorderColor with the
same palette definition as activeOutsideBorderColor to ensure hover
state has dedicated visible color values.

AppItemBackground子类覆盖基类outsideBorderColor时,hovered状态
错误地设为:normal,导致非活跃应用的hover底边使用normal色
(transparent)而完全不可见。将outsideBorderColor统一为与
activeOutsideBorderColor相同的完整palette定义,使hover态有独立的
可见颜色值。

Log: 修复任务栏非活跃应用hover底边描边不可见的问题
PMS: BUG-364205
Influence: 仅影响任务栏应用图标hover底边效果,非活跃应用hover时底边描边恢复正常显示,不影响托盘等其他组件。
@sourcery-ai

sourcery-ai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adjusts the dock AppItemBackground outside border palette so non-active app items show a visible bottom border on hover, with distinct colors for normal, hovered, and pressed states and dark variants.

State diagram for dock AppItemBackground hover border palette

stateDiagram-v2
    state AppItemBackground {
        [*] --> normal

        normal --> hovered : mouseHover
        hovered --> pressed : mousePress
        pressed --> normal : mouseRelease

        state normal {
            [*] --> normalEfficient
            normalEfficient : displayMode = Dock.Efficient
            normalTransparent : displayMode != Dock.Efficient
        }

        state hovered {
            hoveredVisible : outsideBorderColor.crystal = rgba(0,0,0,0.10)
        }

        state pressed {
            pressedVisible : outsideBorderColor.crystal = rgba(0,0,0,0.10)
        }
    }
Loading

File-Level Changes

Change Details Files
Redefines outsideBorderColor palette for dock app items to provide explicit normal, hovered, and pressed colors, fixing invisible hover border for non-active apps.
  • Replace a simple normal/normalDark mapping with a full Palette definition including normal, normalDark, hovered, hoveredDark, pressed, and pressedDark states.
  • Set normal and normalDark crystal colors to conditional values based on Dock.Efficient displayMode, using semi-transparent black only in efficient mode and transparent otherwise.
  • Give hovered and hoveredDark states dedicated semi-transparent black crystal colors so non-active app items have a visible bottom border on hover.
  • Define pressed and pressedDark crystal colors with semi-transparent black values tuned separately for light and dark modes.
panels/dock/taskmanager/package/AppItemBackground.qml

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The outsideBorderColor and activeOutsideBorderColor palettes now have very similar hard-coded RGBA values; consider extracting shared constants or a helper to avoid divergence and make future palette tuning easier.
  • The new RGBA values (0.1/0.05 alpha) for hover/pressed states in Efficient mode are currently magic numbers; adding a brief inline comment or referencing the design token they come from would make the intent of these specific opacities clearer for future adjustments.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The outsideBorderColor and activeOutsideBorderColor palettes now have very similar hard-coded RGBA values; consider extracting shared constants or a helper to avoid divergence and make future palette tuning easier.
- The new RGBA values (0.1/0.05 alpha) for hover/pressed states in Efficient mode are currently magic numbers; adding a brief inline comment or referencing the design token they come from would make the intent of these specific opacities clearer for future adjustments.

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
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@Ivy233

Ivy233 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot deepin-bot Bot merged commit 9ed201a into linuxdeepin:master Jun 8, 2026
9 of 12 checks passed
@Ivy233 Ivy233 deleted the fix/dock-nonactive-hover-border branch June 8, 2026 07:31
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