diff --git a/entry/src/main/ets/application/Settings.ets b/entry/src/main/ets/application/Settings.ets index 699a478e047c84bf72871c1538fa224f74ef05ee..be59f24a4b1b3013bb3d7c2276179f9a69c809d8 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 91ea1ab61de4a4fc02ddb09c53a44baa1873764f..9a9c88067c90fa8e7f20a0563f060a24a0caaa37 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 926aae47a61b523e858ab2e1f9fe8890d8a97ffb..afec74612c0427d3e40a1cbd0fdcd42a92dcbea6 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 d45ef0c71910029d0e018b09b00b48e53c8cd845..dd700286229443f1fd1cf28ad9f0c6de9ba0fcc3 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}`); }