Repository navigation
fix: fall back to standard palette for typed colors without control #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ivy233
wants to merge
1
commit into
linuxdeepin:master
Choose a base branch
from
Ivy233:fix/dde-shell-warning-batch3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接把HighlightPanel的根从Item改成Control是不是也可以,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里先确认一下“根”指哪个对象:
如果指
HighlightPanel.qml的根(当前是Item),不建议直接改成Control。ColorSelector::findAndSetControlParent()是从元素自身开始找第一个Control的,根改成Control后会停在自身;MenuItem/ItemDelegate/NavigationTitle这些把HighlightPanel当 background 的场景就不再继承宿主Control的hovered/pressed/disabled状态。FlowStyle里highlightPanel.background定义了hovered变体,本地最小 QML 对比同一个 hovered 宿主下,Item根是 Hovered /#4099d0,Control根变成 Normal /#308cc6,会有可见的 hover 高亮色变化。如果指
ArrowListView.qml的根FocusScope,也不建议改:Control不继承FocusScope,键盘焦点/导航语义会变;Menu.qml的根是T.Menu/ Popup,更无法改成Control。所以当前只在
Menu/ArrowListView的ListView.highlight外包一层Control,作用域最小;C++ 的standardPalette回退继续覆盖独立/窗口级无Control场景。若希望减少改动,可以只保留 C++ 回退、去掉这两处包裹,但不建议改公共组件的根类型。