fix(dock): fix premature icon label compression in taskbar#1595
Conversation
|
Hi @52cyb. Thanks for your PR. 😃 |
|
Hi @52cyb. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts taskbar task item layout sizing so that text labels are only compressed when the taskbar is actually full, by basing space calculations on icon size and removing overly aggressive implicit size constraints. 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:
- Now that
itemPaddingis derived fromtextCalculator.iconSize / 8instead oftaskmanager.appTitleSpacing, double-check that any other spacing logic (e.g., title spacing or remaining-space calculations) still yields visually consistent gaps between items and titles in both orientations. - By removing the implicit width/height clamping based on
remainingSpacesForTaskManager, very full taskbars may now allow items to overflow; consider adding a follow-up layout safeguard (e.g., overflow handling or max width per item) so the UI degrades gracefully before a future dedicated overflow solution is implemented.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that `itemPadding` is derived from `textCalculator.iconSize / 8` instead of `taskmanager.appTitleSpacing`, double-check that any other spacing logic (e.g., title spacing or remaining-space calculations) still yields visually consistent gaps between items and titles in both orientations.
- By removing the implicit width/height clamping based on `remainingSpacesForTaskManager`, very full taskbars may now allow items to overflow; consider adding a follow-up layout safeguard (e.g., overflow handling or max width per item) so the UI degrades gracefully before a future dedicated overflow solution is implemented.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Use iconSize instead of maxSize to calculate other items' occupied space, and remove overly aggressive implicit size constraints that shrink task items before the taskbar is actually full. 使用图标尺寸而非最大尺寸计算其他项占用空间,移除过度限制 隐式大小的约束,避免任务栏未满时就开始压缩图标标签。 Log: 修复任务栏未满时图标标签被过早压缩的问题 PMS: 358915 Influence: 1.打开多个应用时,任务栏要占满时再开始挤压应用标签;2.相邻应用标签的文案和背景不重叠;3.应用程序过多时,应用图标会溢出任务栏中间区域,后期考虑溢出处理方案。
| cellSize: visualModel.cellWidth | ||
| itemPadding: taskmanager.appTitleSpacing | ||
| cellSize: textCalculator.iconSize | ||
| itemPadding: Math.round(textCalculator.iconSize / 8) |
There was a problem hiding this comment.
Math.round(textCalculator.iconSize / 8) 这个是有特殊含义么?如果这样设置的话,qml中的布局,跟c++里的计算不一致了吧,之前都是用taskmanager.appTitleSpacing
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, 52cyb 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 |
|
/merge |
|
This pr cannot be merged! (status: blocked) |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Use iconSize instead of maxSize to calculate other items' occupied space, and remove overly aggressive implicit size constraints that shrink task items before the taskbar is actually full.
使用图标尺寸而非最大尺寸计算其他项占用空间,移除过度限制
隐式大小的约束,避免任务栏未满时就开始压缩图标标签。
Log: 修复任务栏未满时图标标签被过早压缩的问题
PMS: 358915
Influence: 1.打开多个应用时,任务栏要占满时再开始挤压应用标签;2.相邻应用标签的文案和背景不重叠;3.应用程序过多时,应用图标会溢出任务栏中间区域,后期考虑溢出处理方案。
Summary by Sourcery
Adjust dock taskbar layout calculations to prevent premature compression of app labels and ensure space is based on actual icon sizes.
Bug Fixes:
Enhancements: