From fa0427e595ed8f578c97568c37d2e83189ed4684 Mon Sep 17 00:00:00 2001 From: Suzumiya Date: Sun, 4 Oct 2026 12:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=20AGC=20=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=8A=BD=E5=B1=89=E7=9A=84=E5=8F=AF=E8=A7=81=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 改动规则:apps/ai-game-creator-shell/src/styles.css 的 `.game-distribution-publish-panel` 追加 `scrollbar-width: none` 与其 `::-webkit-scrollbar { display: none; }` - 为什么用 scrollbar-width: none:该抽屉自身就是唯一滚动区(用户口径:这条抽屉里的滚动条太丑);实测隐藏后引擎不再为滚动条预留槽位,内容宽度恒定、无宽度跳变 - 另一条 webkit 规则的必要性:`scrollbar-width` 只覆盖标准路径(Firefox / 新引擎),Chromium / WebView2(AGC 真机)仍需 `::-webkit-scrollbar` 才能隐藏,否则真机上滚动条依旧可见 - 真机实测结论(CDP,WebView2):滚动条布局占位 15px → 0,`clientWidth` 503 → 518,`scrollTopMax` 231 不变,滚轮与键盘仍可滚到底 - 验证命令:`npm run check:encoding`、`git diff --check` --- apps/ai-game-creator-shell/src/styles.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/ai-game-creator-shell/src/styles.css b/apps/ai-game-creator-shell/src/styles.css index 1170fcf68..44bedd55b 100644 --- a/apps/ai-game-creator-shell/src/styles.css +++ b/apps/ai-game-creator-shell/src/styles.css @@ -3506,12 +3506,27 @@ textarea { width: min(520px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow-y: auto; + /* + * 抽屉自身就是唯一滚动区:滚动条一律不画(用户口径:这条抽屉里的滚动条太丑)。 + * 滚轮 / 键盘 / 触控板滚动照旧,内容仍可滚到底。 + * + * 不写 `scrollbar-gutter: stable`:实测(CDP,Chromium/WebView2)在 + * `scrollbar-width: none` 下引擎不会为滚动条预留槽位(预留 0px),所以内容宽度恒定等于 + * `520 - 2×1px 边框`;也因此不会出现「有滚动条 503px / 无滚动条 518px」这种宽度跳变。 + */ + scrollbar-width: none; padding: 24px; border: 1px solid rgb(104 77 57 / 16%); border-radius: 20px; box-shadow: 0 24px 80px rgb(74 48 33 / 20%); } +/* `scrollbar-width` 只覆盖标准属性;WebView2 里仍要显式关掉 webkit 滚动条(口径同 + `.image-canvas-editor__floating-toolbar` 与共享 `.scrollbar-hide`)。 */ +.game-distribution-publish-panel::-webkit-scrollbar { + display: none; +} + .game-distribution-publish-panel__header { display: flex; align-items: flex-start;