fix(dock): align delegate implicitHeight with icon ratio for consiste…#1635
Open
Ivy233 wants to merge 1 commit into
Open
fix(dock): align delegate implicitHeight with icon ratio for consiste…#1635Ivy233 wants to merge 1 commit into
Ivy233 wants to merge 1 commit into
Conversation
…nt spacing Change the delegate implicitHeight in vertical layout from visualModel.cellWidth (dockItemMaxSize * 0.8) to dockItemMaxSize * 9 / 14 (icon size), so the app item uses the same size coefficient in both orientations. This ensures that the gap between adjacent apps is visually equal to the gap from the last plugin to the first app on both horizontal and vertical docks. 纵向布局时,将 delegate 隐式高度从 dockItemMaxSize * 0.8 改为 dockItemMaxSize * 9 / 14(图标尺寸),使横竖排应用项尺寸系数统一, 确保应用间距与插件到首个应用的间距在双侧布局中保持一致。 Log: 修复纵向任务栏应用间距与插件间距不一致的问题 PMS: BUG-364523
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ivy233 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 guide (collapsed on small PRs)Reviewer's GuideAdjusts the dock task delegate’s implicitHeight in vertical (column) layout to be based on the icon size ratio, aligning spacing between app items and between plugins and apps across orientations. Flow diagram for implicitHeight calculation in TaskManager delegateflowchart LR
A[Delegate implicitHeight] --> B{useColumnLayout}
B -- true --> C[implicitHeight = dockItemMaxSize * 9 / 14]
B -- false --> D[implicitHeight = taskmanager.implicitHeight]
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 hard-coded ratio
9 / 14with a named constant or binding to an existing icon size property so that the relationship is self-documenting and easier to adjust in the future. - It might be safer to reference an existing size value (e.g., the actual icon/item size used elsewhere in the dock) instead of recomputing
dockItemMaxSize * 9 / 14here to avoid potential divergence if sizing logic changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider replacing the hard-coded ratio `9 / 14` with a named constant or binding to an existing icon size property so that the relationship is self-documenting and easier to adjust in the future.
- It might be safer to reference an existing size value (e.g., the actual icon/item size used elsewhere in the dock) instead of recomputing `dockItemMaxSize * 9 / 14` here to avoid potential divergence if sizing logic changes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
…nt spacing
Change the delegate implicitHeight in vertical layout from visualModel.cellWidth (dockItemMaxSize * 0.8) to dockItemMaxSize * 9 / 14 (icon size), so the app item uses the same size coefficient in both orientations. This ensures that the gap between adjacent apps is visually equal to the gap from the last plugin to the first app on both horizontal and vertical docks.
纵向布局时,将 delegate 隐式高度从 dockItemMaxSize * 0.8 改为
dockItemMaxSize * 9 / 14(图标尺寸),使横竖排应用项尺寸系数统一,
确保应用间距与插件到首个应用的间距在双侧布局中保持一致。
Log: 修复纵向任务栏应用间距与插件间距不一致的问题
PMS: BUG-364523
Summary by Sourcery
Bug Fixes: