From e60bdbc150358b7350685e75b5e9fd8a8c760de7 Mon Sep 17 00:00:00 2001 From: gaozheng Date: Wed, 10 Jun 2026 16:08:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(canvas):=20=E7=A9=BA=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E7=94=A8=20canvas/bg=20=E7=AD=89=E8=89=B2?= =?UTF-8?q?=E6=97=A0=E7=BC=9D=E5=BA=95(=E5=8E=9F=E7=94=9FGL=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E9=80=8F=E6=98=8E=E5=A4=B1=E6=95=88=E7=9A=84=E5=8F=AF?= =?UTF-8?q?=E9=9D=A0=E8=A7=A3=E6=B3=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index c83497f..043e289 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -397,10 +397,11 @@ void buildWorkbench(QMainWindow& window, geopro::data::LocalSampleRepository& re auto* emptyState = new QFrame(centerWidget); emptyState->setObjectName(QStringLiteral("centralEmpty")); emptyState->setAttribute(Qt::WA_TransparentForMouseEvents); - emptyState->setAttribute(Qt::WA_TranslucentBackground); // 透明浮于深色画布(不让控件填充不透明底) - emptyState->setStyleSheet(QStringLiteral( - "#centralEmpty { background: transparent; }" - "#centralEmpty QLabel { background: transparent; }")); + // 背景取 canvas/bg(#0B1320)——与画布同色:在原生 GL 上覆盖透明无法生效(会回退成不透明浅底), + // 故用与画布等色的不透明底,卡片即「无缝隐形」,浅色提示字稳稳浮于深底(与左上视图详情浮层同法)。 + geopro::app::applyTokenizedStyleSheet( + emptyState, QStringLiteral("#centralEmpty { background: {{canvas/bg}}; }" + "#centralEmpty QLabel { background: transparent; }")); auto* esLay = new QVBoxLayout(emptyState); esLay->setContentsMargins(geopro::app::space::kXl, geopro::app::space::kXl, geopro::app::space::kXl, geopro::app::space::kXl);