diff --git a/application/AppScope/app.json b/application/AppScope/app.json index 06f67b00ebd667987f99c6967fd93c88abab033f..b0c37ab4b638c0406b49661de7849717e54b933a 100644 --- a/application/AppScope/app.json +++ b/application/AppScope/app.json @@ -2,8 +2,8 @@ "app": { "bundleName": "com.ohos.dhardwareui", "vendor": "example", - "versionCode": 10000028, - "versionName": "1.0.28", + "versionCode": 10000029, + "versionName": "1.0.29", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 12, diff --git a/application/AppScope/app.json5 b/application/AppScope/app.json5 index 664c6b0262dbcef7515580fdbe8545e3ab53407f..e54ea680f47b04d17112e46a4922159954f06092 100644 --- a/application/AppScope/app.json5 +++ b/application/AppScope/app.json5 @@ -16,8 +16,8 @@ "app": { "bundleName": "com.ohos.dhardwareui", "vendor": "example", - "versionCode": 10000028, - "versionName": "1.0.28", + "versionCode": 10000029, + "versionName": "1.0.29", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 12, diff --git a/application/entry/src/main/ets/pages/ContinueSwitch.ets b/application/entry/src/main/ets/pages/ContinueSwitch.ets index b06b0958155edead452f5203edbd7c7e363c2e7e..927ccbbb7c6b7b231737f7106a9e1380103ab746 100644 --- a/application/entry/src/main/ets/pages/ContinueSwitch.ets +++ b/application/entry/src/main/ets/pages/ContinueSwitch.ets @@ -27,6 +27,7 @@ import { TipsJumpUtils } from '../utils/TipsJumpUtils'; import osAccount from '@ohos.account.osAccount'; import systemParameterEnhance from '@ohos.systemParameterEnhance'; import i18n from '@ohos.i18n'; +import { LengthMetrics } from '@ohos.arkui.node'; const TAG = '[ContinueSwitch_Page] : '; let context = getContext(this) as common.UIAbilityContext; @@ -70,6 +71,14 @@ struct ContinueSwitch { @StorageProp('currentFontSizeScale') @Watch('onFontSizeScaleChange') fontSizeScale: number = 1; @State phoneSwitchTextTopMargin: string = '17vp'; @State phoneSwitchTextBottomMargin: string = '18vp'; + @State titleBarMargin: LocalizedMargin = { + start: LengthMetrics.resource($r('sys.float.margin_left')), + } + @State titleBarMarginPc: LocalizedMargin = { + start: LengthMetrics.vp(16), + } + @State paddingStartNormal: LengthMetrics = LengthMetrics.resource($r('sys.float.margin_left')); + @State paddingStartPc: LengthMetrics = LengthMetrics.vp(16); private listener: mediaQuery.MediaQueryListener = mediaQuery.matchMediaSync('(dark-mode:true)'); private extContext?: common.UIExtensionContext; private scroller: Scroller = new Scroller(); @@ -262,7 +271,9 @@ struct ContinueSwitch { this.ContentBuilder(); } .hideTitleBar(false) - .title(this.title) + .title(this.title, { + paddingStart: this.is2in1 ? this.paddingStartPc : this.paddingStartNormal, + }) .backgroundColor($r('sys.color.ohos_id_color_titlebar_sub_bg')) } @@ -273,6 +284,7 @@ struct ContinueSwitch { leftIconStyle: EditableLeftIconType.Back, title: $r('app.string.continue_title'), isSaveIconRequired: false, + contentMargin: this.is2in1 ? this.titleBarMarginPc : this.titleBarMargin, onCancel: () => { if (this.continueSession) { this.continueSession.sendData({ 'action': 'pop' })