From c4995d3f4c436e7d465574372b5b6fc0cc505ba5 Mon Sep 17 00:00:00 2001 From: wjyrich Date: Tue, 31 Mar 2026 10:12:08 +0800 Subject: [PATCH] feat: fix notification center height calculation for bottom dock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Fixed height calculation for notification center when dock is positioned at bottom 2. Changed from using static dockSize to dynamic calculation based on visible screen space 3. Added logic to calculate visible height between dock top and screen bottom 4. Ensures notification center doesn't extend beyond visible screen area Log: Fixed notification center display issue when dock is at bottom of screen Influence: 1. Test notification center with dock positioned at bottom of screen 2. Verify notification center height adapts correctly to screen boundaries 3. Test with multiple screen configurations and resolutions 4. Verify notification center doesn't extend beyond visible screen area 5. Test with dock at different positions (left, right, top) to ensure no regression feat: 修复底部停靠栏时通知中心高度计算问题 1. 修复当停靠栏位于底部时通知中心的高度计算问题 2. 从使用静态dockSize改为基于可见屏幕空间的动态计算 3. 添加计算停靠栏顶部到屏幕底部可见高度的逻辑 4. 确保通知中心不会超出可见屏幕区域 Log: 修复停靠栏位于屏幕底部时通知中心显示问题 Influence: 1. 测试停靠栏位于屏幕底部时的通知中心显示 2. 验证通知中心高度是否正确适应屏幕边界 3. 测试多种屏幕配置和分辨率下的表现 4. 验证通知中心不会超出可见屏幕区域 5. 测试停靠栏在不同位置(左、右、顶部)确保没有回归问题 PMS: BUG-353613 T# --- panels/notification/center/package/main.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panels/notification/center/package/main.qml b/panels/notification/center/package/main.qml index 7de3177eb..386749766 100644 --- a/panels/notification/center/package/main.qml +++ b/panels/notification/center/package/main.qml @@ -74,7 +74,8 @@ Window { return Math.min(visibleWidth, dockGeometry.width) } case 2: { // DOCK_BOTTOM - return dockApplet.dockSize + let visibleHeight = Math.max(0, screenGeometry.y + screenGeometry.height - dockGeometry.y) + return Math.min(visibleHeight, dockGeometry.height) } return 0 }