fix(editor): add hover and press states to color mark icons - #538
Open
tianming-1996 wants to merge 1 commit into
Open
fix(editor): add hover and press states to color mark icons#538tianming-1996 wants to merge 1 commit into
tianming-1996 wants to merge 1 commit into
Conversation
Log: 增加颜色标记图标悬停与按压状态 Bug: https://pms.uniontech.com/bug-view-196825.html Influence: 右键菜单颜色标记增加悬停和按压反馈,兼容 Qt5/Qt6。
There was a problem hiding this comment.
Sorry @tianming-1996, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tianming-1996 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideAdds hover and press visual feedback states to color mark icons in ColorLabel, refactors mouse event handling to separate press/release logic, and extends tests to cover new states and behavior while maintaining Qt5/Qt6 compatibility. Sequence diagram for ColorLabel hover/press/release interactionsequenceDiagram
actor User
participant ColorLabel
participant DWidget
participant ColorSelectWdg
User->>ColorLabel: enterEvent
ColorLabel->>DWidget: enterEvent
ColorLabel->>ColorLabel: m_bHover = true
ColorLabel->>ColorLabel: update
ColorLabel->>ColorLabel: paintEvent (hover state)
User->>ColorLabel: mousePressEvent (LeftButton)
ColorLabel->>ColorLabel: m_bPressed = true
ColorLabel->>ColorLabel: update
ColorLabel->>DWidget: mousePressEvent
ColorLabel->>ColorLabel: paintEvent (pressed state)
User->>ColorLabel: mouseReleaseEvent (LeftButton)
ColorLabel->>ColorLabel: m_bPressed = false
ColorLabel->>ColorLabel: m_bSelected = true
ColorLabel->>ColorLabel: update
ColorLabel-->>ColorSelectWdg: sigColorClicked(m_bSelected, m_color)
ColorLabel->>DWidget: mouseReleaseEvent
User->>ColorLabel: leaveEvent
ColorLabel->>DWidget: leaveEvent
ColorLabel->>ColorLabel: m_bHover = false
ColorLabel->>ColorLabel: m_bPressed = false
ColorLabel->>ColorLabel: update
ColorLabel->>ColorLabel: paintEvent (normal/selected state)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Log: 增加颜色标记图标悬停与按压状态
Bug: https://pms.uniontech.com/bug-view-196825.html
Influence: 右键菜单颜色标记增加悬停和按压反馈,兼容 Qt5/Qt6。
Summary by Sourcery
Add interactive hover and press states to color mark icons and finalize selection on release.
New Features:
Bug Fixes:
Enhancements:
Tests:
Chores: