From af0012fd7008e95af6e0a4e42577dfcd15fe37a9 Mon Sep 17 00:00:00 2001 From: gaozheng Date: Wed, 10 Jun 2026 07:38:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(ela):=20P1=20=E5=BA=95=E9=83=A8=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=A0=8F=E8=B4=B4=E5=BA=95=E8=BE=B9=20=E2=80=94=20set?= =?UTF-8?q?CentralCustomWidget=20=E6=94=B9=20addPageNode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ElaCentralStackedWidget::setCustomWidget 用 insertWidget(0,...) 把控件插到页栈容器之上, 被禁用的空导航页栈仍占底部空间,状态栏不贴底边。改用 addPageNode 把工作台作为唯一页面 放进中心页栈,填满到底边。 --- src/app/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index e842a3b..51a9377 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -1026,7 +1026,10 @@ int main(int argc, char* argv[]) ela->setIsNavigationBarEnable(false); // 纯中心内容,不显示左侧导航栏 auto* inner = new QMainWindow(ela); // 以 ela 为父,避免无父期调色板/DPI 抖动(review H3) buildWorkbench(*inner, repo, projectRepo, nav); - ela->setCentralCustomWidget(inner); // 工作台作为 ElaWindow 中心内容 + // 用 addPageNode 把工作台作为唯一页面放进中心页栈(填满到底边)。 + // 注意:不能用 setCentralCustomWidget——它把控件插到页栈容器“之上”,空页栈仍占底部, + // 导致状态栏不贴底边(见 ElaCentralStackedWidget::setCustomWidget 的 insertWidget(0,...))。 + ela->addPageNode(kTitle, inner); topLevel = ela; } else { auto* window = new QMainWindow;