Repository navigation
fix(dock): fix window size and radius during dock animation - #1846
Conversation
Reviewer's GuideUIRelax idle window minimum dimensions, permit fashion-dock width shrinkage, and animate the dock with transforms on xcb so it can resize smoothly while hiding or showing.
Clear the xcb window radius while show/hide or transform animation is in progress to avoid KWin applying blur to the whole window, then restore the configured radius.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. Relax window minimum size to 1 unless dragging so the dock can shrink while hiding. 2. Allow minimum width to shrink when fashion dock mode is enabled. 3. Reset window radius to 0 on xcb during hide/show animations to avoid KWin whole-window blur. 4. Enable transform-based animation on xcb regardless of fashion dock mode. Log: Fix dock window size and radius handling during hide/show animations Influence: Smoother dock animations without blur artifacts on xcb fix(dock): 修复动画过程中窗口尺寸与圆角处理 1. 窗口最小尺寸在非拖拽时放宽为 1,使停靠栏隐藏时可收缩。 2. 时尚模式启用时允许最小宽度收缩。 3. xcb 下隐藏/显示动画期间将窗口圆角重置为 0,避免 KWin 整窗模糊。 4. xcb 下无论是否开启时尚模式都启用基于变换的动画。 Log: 修复停靠栏隐藏/显示动画期间的窗口尺寸与圆角处理 Influence: xcb 下停靠栏动画更流畅且无模糊残影 PMS: TASK-384075
aa1ff1b to
1959365
Compare
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="panels/dock/package/main.qml" line_range="215" />
<code_context>
id: hideShowAnimation;
// Currently, Wayland (Treeland) doesn't support StyledBehindWindowBlur inside the window, thus we keep using the window size approach on Wayland
- property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb" && !fashionDock.enabled
+ property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb"
property bool hiding: false
target: useTransformBasedAnimation ? dockTransform : dock;
</code_context>
<issue_to_address>
**Clicks are intercepted by the hidden dock window**
When an xcb fashion dock is hiding or showing and a click lands in the area vacated by the moving dock content, `hideShowAnimation` moves `dockContainer` but leaves the native window and its input region at the old geometry until the animation stops and hides it, so clicks in the vacated area are consumed instead of reaching the window underneath.
Keep the native window's input region aligned with the moving dock content throughout the animation.
</issue_to_address>
### Comment 2
<location path="panels/dock/package/main.qml" line_range="1092-1098" />
<code_context>
DockCompositor.dockSize = Qt.binding(function(){
return Qt.size(Panel.frontendWindowRect.width, Panel.frontendWindowRect.height)
+
+ // Plugin layout uses the configured thickness, not the window's
+ // animated hide/show size. Keep the protocol size in physical pixels.
+ //const thickness = Math.round(dock.dockSize * Panel.devicePixelRatio)
+ //return dock.useColumnLayout
+ // ? Qt.size(thickness, Panel.frontendWindowRect.height)
+ // : Qt.size(Panel.frontendWindowRect.width, thickness)
})
// 插件需要知道任务栏是否处于时尚模式,例如时间日期插件在时尚模式下
</code_context>
<issue_to_address>
**Plugin layouts resize during dock animation**
When a non-xcb dock is hiding or showing with the size-based animation, `DockCompositor.dockSize` publishes the live `Panel.frontendWindowRect`, and `PluginManager` sends the shrinking dimension through `dockPanelSizeChanged`, so plugins receive an animated size instead of the configured thickness and their layouts reflow or collapse.
Publish the configured dock size to plugins instead of the live window geometry during the animation.
Also at `panels/dock/package/main.qml:119`.
</issue_to_address>
### Comment 3
<location path="panels/dock/package/main.qml" line_range="215" />
<code_context>
id: hideShowAnimation;
// Currently, Wayland (Treeland) doesn't support StyledBehindWindowBlur inside the window, thus we keep using the window size approach on Wayland
- property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb" && !fashionDock.enabled
+ property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb"
property bool hiding: false
target: useTransformBasedAnimation ? dockTransform : dock;
</code_context>
<issue_to_address>
**Position changes still resize windows**
When an xcb fashion dock changes between the top and bottom positions, `dockAnimation` still disables transform-based animation for fashion mode, so moving an xcb fashion dock between its supported top and bottom positions animates the window height rather than translating the dock. The fashion dock therefore does not use transform-based animation for this position-change path.
Enable transform-based animation for fashion mode in `dockAnimation` as well, and ensure its transform direction follows the position being animated.
</issue_to_address>
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, wjyrich 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 |
Log: Fix dock window sizing and rounded corners during show/hide animation
Influence: Fashion dock show/hide is smoother with correct size and corners
fix(dock): 修复任务栏动画时的窗口尺寸与圆角问题
Log: 修复任务栏显示/隐藏动画时的窗口尺寸与圆角问题
Influence: 时尚模式任务栏动画更流畅,尺寸与圆角显示正确
PMS: BUG-384075
Summary by Sourcery
Improve dock show and hide animations by correcting window sizing, resizing behavior, and rounded-corner rendering.
Bug Fixes:
Enhancements: