From b4b8d586491adb2a97bba20b91dddf528a8496e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9E=E6=BC=AA?= Date: Fri, 14 Mar 2025 17:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=83=E6=9C=8D=E5=8A=A1menubar=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A8=A1=E7=B3=8A=E6=95=88=E6=9E=9C&&=E5=85=83?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=B7=B3=E8=BD=AC=E5=8D=8A=E5=B1=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 连漪 --- customappbar/interfaces/custom_app_bar.js | 3 +++ customappbar/source/custom_app_bar.ets | 3 +++ 2 files changed, 6 insertions(+) diff --git a/customappbar/interfaces/custom_app_bar.js b/customappbar/interfaces/custom_app_bar.js index aa55468..b9cd712 100644 --- a/customappbar/interfaces/custom_app_bar.js +++ b/customappbar/interfaces/custom_app_bar.js @@ -34,6 +34,7 @@ const ICON_SIZE = 27; const ICON_FILL_COLOR_DEFAULT = '#182431'; const BORDER_COLOR_DEFAULT = '#33000000'; const MENU_BACK_COLOR = '#99FFFFFF'; +const MENU_BACK_BLUR = 5; const MENU_MARGIN_TOP = 10; const SM_MENU_MARGIN_END = 16; const MD_MENU_MARGIN_END = 24; @@ -825,6 +826,7 @@ export class CustomAppBar extends ViewPU { Row.borderWidth(BORDER_WIDTH); Row.borderColor(this.menubarBorderColor); Row.backgroundColor(this.menubarBackColor); + Row.backdropBlur(MENU_BACK_BLUR); Row.height(VIEW_HEIGHT); Row.width(VIEW_WIDTH); Row.align(Alignment.Top); @@ -1141,6 +1143,7 @@ export class CustomAppBar extends ViewPU { Row.clip(true); Row.alignItems(VerticalAlign.Bottom); Row.hitTestBehavior(HitTestMode.Transparent); + Row.width('100%'); Row.id('AtomicServiceStageId'); }, Row); Row.pop(); diff --git a/customappbar/source/custom_app_bar.ets b/customappbar/source/custom_app_bar.ets index fad4632..7723dc7 100644 --- a/customappbar/source/custom_app_bar.ets +++ b/customappbar/source/custom_app_bar.ets @@ -29,6 +29,7 @@ const ICON_SIZE: number = 27; const ICON_FILL_COLOR_DEFAULT: string = '#182431'; const BORDER_COLOR_DEFAULT: string = '#33000000'; const MENU_BACK_COLOR: string = '#99FFFFFF'; +const MENU_BACK_BLUR: number = 5; const MENU_MARGIN_TOP: number = 10; const SM_MENU_MARGIN_END: number = 16; const MD_MENU_MARGIN_END: number = 24; @@ -501,6 +502,7 @@ export struct CustomAppBar { .borderWidth(BORDER_WIDTH) .borderColor(this.menubarBorderColor) .backgroundColor(this.menubarBackColor) + .backdropBlur(MENU_BACK_BLUR) .height(VIEW_HEIGHT) .width(VIEW_WIDTH) .align(Alignment.Top) @@ -669,6 +671,7 @@ export struct CustomAppBar { .clip(true) .alignItems(VerticalAlign.Bottom) .hitTestBehavior(HitTestMode.Transparent) + .width('100%') .id('AtomicServiceStageId') } .height(this.containerHeight) -- Gitee