ke: 玻璃面板(系统材质):WideSidebar bgActive 走 BlurStyle,撤回手写 alpha

遵守既有玻璃纪律(cross-client-theme B/C):
- 手写 8 位半透明色一律禁止(半透明归系统材质),撤回 #E6FFFFFF 尝试
- 玻璃 = 系统 BlurStyle(navMaterial) + 不透明系统色 surface,半透明由 BlurStyle 给
- WideSidebar 加 @Prop bgActive:bgActive 时 backgroundBlurStyle,否则 NONE
- 内容面板只保留几何(radius/clip/padding/gap),不加材质(判据按 @Builder 解析
  owner 会与 NavBar 撞 key;壁纸从面板缝隙露出已达成 app-shell 观感)
- GLASS_REGISTRY 登记 WideSidebar#NavItemBuilder(判据按最近 @Builder 命名)
This commit is contained in:
2026-09-16 08:06:36 +08:00
parent 31fdc1a3d8
commit 6cd64a4384
3 changed files with 21 additions and 1 deletions

View File

@ -1872,6 +1872,7 @@ struct MainPage {
if (this.isWide) {
WideSidebar({
currentIndex: this.currentIndex,
bgActive: this.bgActive,
onSelect: (index: number) => { this.currentIndex = normalizeNavIndex(index); },
onSettings: () => { this.getUIContext().getRouter().pushUrl({ url: 'pages/SettingsPage' }); }
})
@ -1902,6 +1903,13 @@ struct MainPage {
}
.width('100%')
.height('100%')
/*
* ★ 2026-09-16:宽屏内容面板的玻璃几何(对齐 WebUI app-shell)。
* 圆角 14 + clip(子内容被裁剪)+ 容器 padding/gap(面板缝隙露壁纸)。
* 玻璃材质只在 WideSidebar 上(判据按 @Builder 解析 owner,内容面板会与
* NavBar 撞 key);内容面板用不透明系统色 surface —— 壁纸从缝隙露出已达成 app-shell 观感。
*/
.backgroundColor(Theme.surface)
.borderRadius(this.isWide ? Theme.glassRadius : 0)
.clip(this.isWide)
.padding({ bottom: this.isWide ? 0 : NAV_CONTENT_RESERVE })