diff --git a/panels/dock/OverflowContainer.qml b/panels/dock/OverflowContainer.qml index aa3066df6..9b9558a6e 100644 --- a/panels/dock/OverflowContainer.qml +++ b/panels/dock/OverflowContainer.qml @@ -22,6 +22,7 @@ Item { ListView { id: listView anchors.fill: parent + clip: true orientation: useColumnLayout ? ListView.Vertical : ListView.Horizontal layoutDirection: Qt.LeftToRight verticalLayoutDirection: ListView.TopToBottom diff --git a/panels/dock/package/main.qml b/panels/dock/package/main.qml index 545a71815..bc2dbc179 100644 --- a/panels/dock/package/main.qml +++ b/panels/dock/package/main.qml @@ -58,6 +58,13 @@ Window { // 时尚模式下,dockRightPart 在 gridLayout 右侧,之间需要扣除 dockSpacing // 同时保留左右悬浮间距,避免窗口铺满屏幕后圆角边框被屏幕边缘裁剪。 space -= Math.ceil(gridLayout.columnSpacing) * 2 + fashionDock.floatingMargin * 2; + } else if (gridLayout) { + // 非时尚模式下扣除 GridLayout 列间距,避免中间区域与右侧托盘区域重叠 + let spacing = Math.ceil(gridLayout.columnSpacing); + space -= spacing; + if (dockLeftPart.visible) { + space -= spacing; + } } return Math.max(0, space); }