From 51114ac983130ed9651cf00fab46ba0edd58db66 Mon Sep 17 00:00:00 2001 From: liujinchang Date: Fri, 30 Oct 2026 03:02:57 +0800 Subject: [PATCH] fix: use window center for shortcuts popup position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: displayShortcuts() calculated window center at line 2574-2575 but then overwrote it with screen center via screen->geometry().center() at line 2593, causing the popup to center on the full screen instead of the window 2. Fix: remove the pos = screen->geometry().center() override line, keeping the screen selection logic for multi-monitor support while using window center as the position 3. Impact: shortcuts popup now centers on the editor window instead of screen center; fixes occlusion in split-screen mode where screen center falls on the split boundary Log: Fix shortcuts popup occlusion in split-screen mode Influence: 1. Test shortcuts popup position in single-screen mode 2. Test shortcuts popup position in split-screen mode 3. Test shortcuts popup position in multi-monitor mode fix: 修复分屏模式下快捷键帮助浮窗遮挡问题 1. 根因:displayShortcuts() 在第 2574-2575 行计算了窗口中心 坐标,但第 2593 行用 screen->geometry().center() 覆盖为 屏幕中心,导致浮窗以整屏中心定位而非窗口中心 2. 方案:删除 pos = screen->geometry().center() 覆盖行,保留 屏幕选择逻辑用于多显示器场景,定位坐标使用窗口中心 3. 影响:快捷键帮助浮窗以编辑器窗口中心定位,修复分屏模式 下浮窗定位于分屏分界线导致的遮挡问题 Log: 修复分屏模式下快捷键帮助浮窗遮挡问题 Influence: 1. 测试单屏模式下快捷键帮助浮窗定位 2. 测试分屏模式下快捷键帮助浮窗定位 3. 测试多显示器场景下快捷键帮助浮窗定位 Bug: #189255 --- src/widgets/window.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/widgets/window.cpp b/src/widgets/window.cpp index 46b26158..12183e4f 100644 --- a/src/widgets/window.cpp +++ b/src/widgets/window.cpp @@ -2590,7 +2590,6 @@ void Window::displayShortcuts() #endif if (screen) { - pos = screen->geometry().center(); qCDebug(appLog) << "Screen center position: " << pos; }