From 06a704136d108eb1406816b668df3fed36e2c3e4 Mon Sep 17 00:00:00 2001 From: yeshanshan Date: Tue, 24 Nov 2026 22:56:49 +0800 Subject: [PATCH] fix: adjust folder popup layout to match design spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: cellWidth/cellHeight were 96/104 instead of 90/98, Grid spacing was unset instead of 30px per design specification 2. Fix: change cellWidth to 90, cellHeight to 98, add Grid spacing 30, add spacing terms to panel width/height/contentHeight formulas 3. Impact: dock fashion-mode folder popup now matches design spec for hover frame size and icon spacing Log: adjust dock folder popup layout to match design specification Influence: 1. Test folder popup with different app counts (<=4, 5-8, >8) 2. Verify popup positioning near screen edges 3. Check hover frame size and icon spacing visually fix: 调整应用组弹窗布局以匹配设计规范 1. 根因:cellWidth/cellHeight 设为 96/104 而非设计规范的 90/98, Grid 未设置 spacing 而非设计规范的 30px 2. 方案:将 cellWidth 改为 90、cellHeight 改为 98、Grid 添加 spacing 30,并在面板宽高及 contentHeight 公式中补加 spacing 项 3. 影响:任务栏时尚模式应用组弹窗的 hover 框尺寸和图标间距 现符合设计规范 Log: 调整任务栏应用组弹窗布局以匹配设计规范 Influence: 1. 测试不同应用数量下(≤4、5-8、>8)的弹窗布局 2. 验证屏幕边缘附近弹窗的定位行为 3. 目视检查 hover 框尺寸和图标间距 PMS: BUG-384283 --- panels/dock/taskmanager/package/FolderPopup.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/panels/dock/taskmanager/package/FolderPopup.qml b/panels/dock/taskmanager/package/FolderPopup.qml index 15d8a6e8f..beb626fe0 100644 --- a/panels/dock/taskmanager/package/FolderPopup.qml +++ b/panels/dock/taskmanager/package/FolderPopup.qml @@ -23,8 +23,8 @@ PanelPopup { readonly property int itemCount: contents.length readonly property int columns: itemCount <= 8 ? 4 : 5 readonly property int rows: Math.max(1, Math.ceil(itemCount / columns)) - readonly property real cellWidth: 96 - readonly property real cellHeight: 104 + readonly property real cellWidth: 90 + readonly property real cellHeight: 98 readonly property var screen: Panel.rootObject.screen // desktopAvailableWidth/Height describe the virtual desktop, not the // current monitor. Use its work area, including offsets from other panels. @@ -41,10 +41,10 @@ PanelPopup { readonly property real maximumHeight: screenHeight - (verticalDock ? 20 : Panel.rootObject.height + 30) width: hasProviderContent ? Math.max(1, Math.min(maximumWidth, contentLoader.item ? contentLoader.item.implicitWidth : 320)) - : Math.min(Math.max(minimumWidth, columns * cellWidth + 24), maximumWidth) + : Math.min(Math.max(minimumWidth, columns * cellWidth + (columns - 1) * 30 + 24), maximumWidth) height: hasProviderContent ? Math.max(1, Math.min(maximumHeight, contentLoader.item ? contentLoader.item.implicitHeight : 120)) - : Math.min(Math.min(3, rows) * cellHeight + 56, maximumHeight) + : Math.min(Math.min(3, rows) * cellHeight + (Math.min(3, rows) - 1) * 30 + 56, maximumHeight) contentReady: hasProviderContent ? contentLoader.status !== Loader.Loading : true popupX: Math.max(screenX - Panel.rootObject.x + 10, Math.min(positionerAnchor.DockPanelPositioner.x, screenX + screenWidth - Panel.rootObject.x - width - 10)) @@ -114,7 +114,7 @@ PanelPopup { anchors.leftMargin: 12 anchors.rightMargin: 12 contentWidth: width - contentHeight: root.rows * root.cellHeight + contentHeight: root.rows * root.cellHeight + (root.rows - 1) * 30 clip: true boundsBehavior: Flickable.StopAtBounds flickableDirection: Flickable.VerticalFlick @@ -124,6 +124,7 @@ PanelPopup { } Grid { columns: root.columns + spacing: 30 Repeater { model: root.contents ItemDelegate {