From 70e58b38ac8c89c6638b1f891c309787341cc2e3 Mon Sep 17 00:00:00 2001 From: EasyGuohf <163991322+EasyGuohf@users.noreply.github.com> Date: Tue, 27 May 2025 10:24:19 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=AE=BE=E7=BD=AE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=8C=89=E9=92=AE=EF=BC=9B2=E3=80=81?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/application/Settings.ets | 3 +++ entry/src/main/ets/common/PhotoSideBar.ets | 2 +- entry/src/main/ets/common/WlanItem.ets | 2 -- entry/src/main/ets/entryability/EntryAbility.ets | 5 +++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/entry/src/main/ets/application/Settings.ets b/entry/src/main/ets/application/Settings.ets index 699a478..be59f24 100644 --- a/entry/src/main/ets/application/Settings.ets +++ b/entry/src/main/ets/application/Settings.ets @@ -24,6 +24,7 @@ let storage = LocalStorage.getShared(); struct Settings { @State pathInfo: NavPathStack = new NavPathStack(); @LocalStorageLink('currentBreakPoint') currentBreakPoint: string = 'md'; + @StorageProp('topRectHeight') topRectHeight: number = 0; @Builder myRouter(name: string, param?: number | undefined) { @@ -138,9 +139,11 @@ struct Settings { } .navBarWidth(293) .title($r('app.string.settings')) + .titleMode(NavigationTitleMode.Mini) .backgroundColor($r('sys.color.background_secondary')) .width('100%') .height('100%') + .padding({ top: px2vp(this.topRectHeight) }) .navDestination(this.myRouter) } } diff --git a/entry/src/main/ets/common/PhotoSideBar.ets b/entry/src/main/ets/common/PhotoSideBar.ets index 91ea1ab..9a9c880 100644 --- a/entry/src/main/ets/common/PhotoSideBar.ets +++ b/entry/src/main/ets/common/PhotoSideBar.ets @@ -112,7 +112,7 @@ export struct PhotoSideBar { } .width('100%').height('100%') .padding({ - top: px2vp(this.topRectHeight), + top: CommonConstants.BACK_SIZE, left: new BreakpointType(16, 24, 32).GetValue(this.curBp), right: new BreakpointType(16, 24, 32).GetValue(this.curBp) }) diff --git a/entry/src/main/ets/common/WlanItem.ets b/entry/src/main/ets/common/WlanItem.ets index 926aae4..afec746 100644 --- a/entry/src/main/ets/common/WlanItem.ets +++ b/entry/src/main/ets/common/WlanItem.ets @@ -21,7 +21,6 @@ import { BreakpointType } from './BreakpointSystem'; export struct WlanItem { @State netWorkStatus: Resource = $r('app.string.closed'); @LocalStorageProp('currentBreakPoint') currentBreakPoint: string = 'md'; - @StorageProp('topRectHeight') topRectHeight: number = 0; @Builder CustomDivider() { @@ -157,7 +156,6 @@ export struct WlanItem { .padding({ left: new BreakpointType(16, 16, 16).GetValue(this.currentBreakPoint), right: new BreakpointType(16, 16, 16).GetValue(this.currentBreakPoint), - top: px2vp(this.topRectHeight) }) .hideTitleBar(true) .title('WLAN') diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index d45ef0c..dd70028 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -67,6 +67,11 @@ export default class EntryAbility extends UIAbility { windowObj.on('windowSizeChange', (windowSize) => { this.updateBreakpoint(windowSize.width); }); + windowObj.setWindowLayoutFullScreen(true).then(() => { + hilog.info(0x0000, 'testTag', 'Succeeded in setting the window layout to full-screen mode.'); + }).catch((err: BusinessError) => { + hilog.error(0x0000, 'testTag', `Failed to set the window layout to full-screen mode. Cause: ${err.message}`); + }); } catch (error) { hilog.error(0x0000, 'testTag', `Update window size fail. Cause: ${(error as BusinessError).message}`); } -- Gitee