fix: Fix the issue where disabled modules are not grayed out#2910
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds opacity binding to the mouse size control so that it visually reflects the enabled/disabled state by graying out when disabled. Flow diagram for opacity binding of mouse size controlflowchart TD
A[MouseSizeControl created] --> B{enabled state}
B -->|true| C[Set opacity to 1]
B -->|false| D[Set opacity to 0.4]
C --> E[Control appears fully active]
D --> F[Control appears grayed out]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider replacing the hardcoded
0.4opacity with a shared constant or theme value so the disabled appearance remains consistent with other controls and can be tuned centrally. - If this control has child items that also have their own
opacitybindings, double-check that the parent-level opacity change will not conflict with or override any intended visual states for those children.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider replacing the hardcoded `0.4` opacity with a shared constant or theme value so the disabled appearance remains consistent with other controls and can be tuned centrally.
- If this control has child items that also have their own `opacity` bindings, double-check that the parent-level opacity change will not conflict with or override any intended visual states for those children.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Fix the issue where disabled modules are not grayed out Log: Fix the issue where disabled modules are not grayed out pms: BUG-345387
1848789 to
25a445a
Compare
deepin pr auto review我来对这段代码变更进行审查:
改进建议:
readonly property real disabledOpacity: 0.4
opacity: enabled ? 1 : disabledOpacity
Behavior on opacity {
NumberAnimation { duration: 200 }
}总的来说,这是一个很好的改进,提升了用户体验,代码质量良好。 |
caixr23
approved these changes
Dec 29, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, pengfeixx 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 |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
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.
Fix the issue where disabled modules are not grayed out
Log: Fix the issue where disabled modules are not grayed out
pms: BUG-345387
Summary by Sourcery
Bug Fixes: