From 28ad6e523d46b351122f66d4641c8f4838df1c4e Mon Sep 17 00:00:00 2001 From: dengxiaoyu Date: Mon, 21 Oct 2024 16:56:39 +0800 Subject: [PATCH 1/4] fix switch list changed by fontsize Signed-off-by: dengxiaoyu --- application/AppScope/app.json | 4 +- application/AppScope/app.json5 | 4 +- .../ets/common/constants/CommonConstants.ets | 15 ++- .../src/main/ets/pages/ContinueSwitch.ets | 122 +++++++++++------- 4 files changed, 91 insertions(+), 54 deletions(-) diff --git a/application/AppScope/app.json b/application/AppScope/app.json index b5b8b8ed..9e45447d 100644 --- a/application/AppScope/app.json +++ b/application/AppScope/app.json @@ -2,8 +2,8 @@ "app": { "bundleName": "com.ohos.dhardwareui", "vendor": "example", - "versionCode": 10000022, - "versionName": "1.0.22", + "versionCode": 10000024, + "versionName": "1.0.24", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 12, diff --git a/application/AppScope/app.json5 b/application/AppScope/app.json5 index 9b69c61a..889d8b5d 100644 --- a/application/AppScope/app.json5 +++ b/application/AppScope/app.json5 @@ -16,8 +16,8 @@ "app": { "bundleName": "com.ohos.dhardwareui", "vendor": "example", - "versionCode": 10000022, - "versionName": "1.0.22", + "versionCode": 10000024, + "versionName": "1.0.24", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 12, diff --git a/application/entry/src/main/ets/common/constants/CommonConstants.ets b/application/entry/src/main/ets/common/constants/CommonConstants.ets index fabc107d..1fbfb260 100644 --- a/application/entry/src/main/ets/common/constants/CommonConstants.ets +++ b/application/entry/src/main/ets/common/constants/CommonConstants.ets @@ -33,10 +33,11 @@ export default class CommonConstants { public static readonly CONTINUE_SWITCH_WIDTH: number = 36; public static readonly CONTINUE_SWITCH_HEIGHT: number = 20; public static readonly ITEM_LIST_PADDING_TOP_PC: number = 13; - public static readonly ITEM_LIST_PADDING_BOTTOM_PC: number = 14; + public static readonly ITEM_LIST_PADDING_BOTTOM_PC: number = 13; public static readonly ITEM_LIST_PADDING_TOP: number = 17; public static readonly ITEM_LIST_PADDING_BOTTOM: number = 18; public static readonly CONTINUE_SWITCH_KEY: string = 'Continue_Switch_Status'; + public static readonly CONTINUE_SWITCH_KEY: string = 'persist.sys.font_scale_for_user0'; // Tips public static readonly TIPS_TYPE: string = '105'; public static readonly FUN_NUM = 'SF-20005815_f101'; @@ -46,4 +47,16 @@ export default class CommonConstants { // Update prompt text public static readonly UPDATE_PROMPT_LINE_HEIGHT: number = 16; public static readonly UPDATE_PROMPT_MARGIN_TOP: number = 9; +} + +export enum FontSizeScale { + SM = 0.85, + MD = 1.0, + DEFAULT = MD, + L = 1.15, + XL = 1.3, + XXL = 1.45, + XXL1 = 1.75, + XXL2 = 2, + XXL3 = 3.2, } \ No newline at end of file diff --git a/application/entry/src/main/ets/pages/ContinueSwitch.ets b/application/entry/src/main/ets/pages/ContinueSwitch.ets index 79fd3a04..dfe805c7 100644 --- a/application/entry/src/main/ets/pages/ContinueSwitch.ets +++ b/application/entry/src/main/ets/pages/ContinueSwitch.ets @@ -21,10 +21,11 @@ import { BusinessError } from '@ohos.base'; import { EditableLeftIconType, EditableTitleBar } from '@ohos.arkui.advanced.EditableTitleBar'; import mediaQuery from '@ohos.mediaquery'; import ConfigurationConstant from '@ohos.app.ability.ConfigurationConstant'; -import CommonConstants from '../common/constants/CommonConstants'; +import CommonConstants, { FontSizeScale } from '../common/constants/CommonConstants'; import { logger } from '../utils/Logger'; import { TipsJumpUtils } from '../utils/TipsJumpUtils'; import osAccount from '@ohos.account.osAccount'; +import systemParameterEnhance from '@ohos.systemParameterEnhance'; const TAG = '[ContinueSwitch_Page] : '; let context = getContext(this) as common.UIAbilityContext; @@ -64,6 +65,7 @@ struct ContinueSwitch { @State iterations: number = -1; @State isEnabled: boolean = true; @State isShowBack: boolean = true; + @StorageProp('currentFontSizeScale') @Watch('onFontSizeScaleChange') fontSizeScale: number = 1; private listener: mediaQuery.MediaQueryListener = mediaQuery.matchMediaSync('(dark-mode:true)'); private extContext?: common.UIExtensionContext; private scroller: Scroller = new Scroller(); @@ -73,7 +75,7 @@ struct ContinueSwitch { private startReason?: string = ''; onPortrait(mediaQueryResult: mediaQuery.MediaQueryResult): void { - logger.info(TAG + 'onPortrait in'); + logger.info(`${TAG} 'onPortrait in`); if (mediaQueryResult.matches as boolean) { this.extContext?.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_DARK); } else { @@ -81,6 +83,38 @@ struct ContinueSwitch { } } + onFontSizeScaleChange(): void { + logger.info(`${TAG} onFontSizeScaleChange`); + this.phoneSwitchTextTopMargin = this.UpdateMarginBasedOnFontSize(17, this.fontSizeScale); + this.phoneSwitchTextBottomMargin = this.UpdateMarginBasedOnFontSize(18, this.fontSizeScale); + } + + /** + * Update the margins of the switch list according to the font size. + */ + public UpdateMarginBasedOnFontSize(fontFp: number, fontSizeScale: number): string { + logger.info(`${TAG} getlistSpace, fontSizeScale: ${fontSizeScale} ; fontFp: ${fontFp}`); + switch (fontSizeScale) { + case FontSizeScale.XXL1: + return '16vp'; + case FontSizeScale.XXL2: + return '20vp'; + case FontSizeScale.XXL3: + return '24vp'; + default: + return `${fontFp}vp`; + } + } + + /** + * Initialize the switch list spacing size + */ + public phoneSwitchTextMarginInit(): void { + let fontSizeScale = parseFloat(systemParameterEnhance.getSync(CommonConstants.FONT_SIZE_SCALE_PARAM, '1')); + this.phoneSwitchTextTopMargin = this.UpdateMarginBasedOnFontSize(17, fontSizeScale); + this.phoneSwitchTextBottomMargin = this.UpdateMarginBasedOnFontSize(18, fontSizeScale); + } + /** * @description Calculate the ImageAnimator size * Calculation rule: @@ -91,7 +125,7 @@ struct ContinueSwitch { * @param width */ getImageAnimatorSize(height: Length, width: Length): void { - logger.info(TAG + 'getImageAnimatorSize in, deviceInfo.deviceType : ' + deviceInfo.deviceType); + logger.info(`${TAG} getImageAnimatorSize in, deviceInfo.deviceType : ${deviceInfo.deviceType}`); let totalHeight = height as number; this.shortSideSize = width < totalHeight / 2 ? width as number : totalHeight / 2 as number; if (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'tablet') { @@ -101,12 +135,12 @@ struct ContinueSwitch { this.imageAnimatorWidth = this.shortSideSize * 0.8 * 3 / 2; this.imageAnimatorHeight = this.shortSideSize * 0.8; } - logger.info(TAG + 'this.shortSideSize = ' + this.shortSideSize + ', this.imageAnimatorWidth = ' + - this.imageAnimatorWidth + ', this.imageAnimatorHeight = ' + this.imageAnimatorHeight); + logger.info(`${TAG} this.shortSideSize = ${this.shortSideSize} , this.imageAnimatorWidth = + ${this.imageAnimatorWidth} , this.imageAnimatorHeight = ${this.imageAnimatorHeight}`); } getStringSync(): void { - logger.info(TAG + 'getStringSync in'); + logger.info(`${TAG} getStringSync in`); try { context.resourceManager.getStringValue($r('app.string.continue_title') .id, (error: BusinessError, value: string) => { @@ -114,18 +148,18 @@ struct ContinueSwitch { logger.error(TAG + 'error is ' + error); } else { this.title = value; - logger.info(TAG + ' this.title : ' + this.title); + logger.info(`${TAG} this.title : ${this.title}`); } }) } catch (error) { let code: number = (error as BusinessError).code; let message: string = (error as BusinessError).message; - logger.error(TAG + `callback getStringValue failed,error code: ${code},message: ${message}.`); + logger.error(`${TAG} callback getStringValue failed,error code: ${code},message: ${message}.`); } } getImageArray(): void { - logger.info(TAG + 'getImageArray in'); + logger.info(`${TAG} getImageArray in`); for (let i = 0; i <= CommonConstants.IMAGE_COUNT; ++i) { this.imageArray.push({ src: $r(`app.media.continue_${i}`), @@ -136,57 +170,57 @@ struct ContinueSwitch { } getGapLength(): void { - logger.info(TAG + 'getGapLength in, deviceInfo.deviceType : ' + deviceInfo.deviceType); + logger.info(`${TAG} getGapLength in, deviceInfo.deviceType : ${deviceInfo.deviceType}`); if (deviceInfo.deviceType == 'phone') { this.gapLength = CommonConstants.GENERAL_PHONE_GAP_LENGTH; } else if (deviceInfo.deviceType == '2in1' || deviceInfo.deviceType == 'tablet') { this.gapLength = CommonConstants.PC_PAD_GAP_LENGTH; } - logger.info(TAG + 'this.gapLength : ' + this.gapLength); + logger.info(`${TAG} this.gapLength : ${this.gapLength}`); } getForegroundOsAccountLocalId(): void { - logger.info(TAG + 'getForegroundOsAccountLocalId in'); + logger.info(`${TAG} getForegroundOsAccountLocalId in`); try { this.accountManager.getForegroundOsAccountLocalId().then((localId: number) => { - logger.info(TAG + 'getForegroundOsAccountLocalId, localId: ' + localId); + logger.info(`${TAG} getForegroundOsAccountLocalId, localId: ${localId}`); this.getAccountInfo(localId); }).catch((err: BusinessError) => { - logger.error(TAG + 'getForegroundOsAccountLocalId err: ' + JSON.stringify(err)); + logger.error(`${TAG} getForegroundOsAccountLocalId errCode: ${err?.code}`); }); } catch (e) { - logger.error(TAG + 'getForegroundOsAccountLocalId exception: ' + JSON.stringify(e)); + logger.error(`${TAG} getForegroundOsAccountLocalId exception: ${err?.message}`); } } getAccountInfo(localId: number): void { - logger.info(TAG + 'getAccountInfo in'); + logger.info(`${TAG} getAccountInfo in`); try { this.accountManager.queryOsAccountById(localId).then((accountInfo: osAccount.OsAccountInfo) => { - logger.info(TAG + 'queryOsAccountById, accountInfo.type: ' + JSON.stringify(accountInfo.type)); + logger.info(`${TAG} queryOsAccountById, accountInfo.type: ${accountInfo.type}`); if (accountInfo.type === osAccount.OsAccountType.PRIVATE) { let status: boolean = settings.setValueSync(context, CommonConstants.CONTINUE_SWITCH_KEY, switchState.close, settings.domainName.USER_SECURITY); this.isSwitchOn = false; this.isEnabled = false; - logger.info(TAG + 'set value isSuccess : status =' + status + '; set:Continue_Switch_Status is 0'); + logger.info(`${TAG} set value isSuccess : status = ${status}; set:Continue_Switch_Status is 0`); } }).catch((err: BusinessError) => { - logger.error(TAG + 'queryOsAccountById err: ' + JSON.stringify(err)); + logger.error(`${TAG} queryOsAccountById errCode: ${err?.code}`); }); } catch (e) { - logger.error(TAG + 'queryOsAccountById exception: ' + JSON.stringify(e)); + logger.error(`${TAG} queryOsAccountById exception: ${err?.message}`); } } onPageShow() { - logger.info(TAG + 'onPageShow in'); + logger.info(`${TAG} onPageShow in`); this.getGapLength(); display.getAllDisplays((err, data) => { this.screenWidth = px2vp(data[0].width); this.screenHeight = px2vp(data[0].height); this.contentHeight = this.screenHeight; - logger.info(TAG + 'screenWidth = ' + this.screenWidth + '; screenHeight = ' + this.screenHeight); + logger.info(`${TAG} screenWidth = ${this.screenWidth}; screenHeight = ${this.screenHeight}`); }) this.is2in1 = deviceInfo.deviceType === '2in1' ? true : false; } @@ -197,15 +231,15 @@ struct ContinueSwitch { let value = settings.getValueSync(context, CommonConstants.CONTINUE_SWITCH_KEY, switchState.open, settings.domainName.USER_SECURITY); this.isSwitchOn = value != switchState.close ? true : false; - logger.info(TAG + ' this.isSwitchOn : ' + this.isSwitchOn + '; value: ' + value); + logger.info(`${TAG} this.isSwitchOn : ${this.isSwitchOn}; value: ${value}`); AppStorage.setOrCreate('isSwitchOn', this.isSwitchOn); - logger.info(TAG + 'AppStorage.get(isSwitchOn) : ' + AppStorage.get('isSwitchOn')); + logger.info(`${TAG} AppStorage.get(isSwitchOn) : ${AppStorage.get('isSwitchOn')}`); if (this.isSwitchOn) { let status: boolean = settings.setValueSync(context, CommonConstants.CONTINUE_SWITCH_KEY, switchState.open, settings.domainName.USER_SECURITY); - logger.info(TAG + 'set value success :' + status + '; set:Continue_Switch_Status is 1'); + logger.info(`${TAG} set value success :${status}; set:Continue_Switch_Status is 1`); } this.getStringSync(); @@ -222,6 +256,7 @@ struct ContinueSwitch { this.checkFoldBackButton(); } this.checkPcPadBackButton(); + this.phoneSwitchTextMarginInit(); } aboutToDisappear() { @@ -229,7 +264,7 @@ struct ContinueSwitch { } onBackPress() { - logger.info(TAG + 'onBackPress in'); + logger.info(`${TAG} onBackPress in`); } @Builder @@ -259,7 +294,7 @@ struct ContinueSwitch { if (this.continueSession) { this.continueSession.sendData({ 'action': 'pop' }) } else { - logger.error(TAG + 'continueSession is undefined'); + logger.error(`${TAG} continueSession is undefined`); } } }) @@ -279,10 +314,10 @@ struct ContinueSwitch { .width(this.imageAnimatorWidth) .height(this.imageAnimatorHeight) .onStart(() => { - logger.info(TAG + 'ImageAnimator Start'); + logger.info(`${TAG} ImageAnimator Start`); }) .onFinish(() => { - logger.info(TAG + 'ImageAnimator Finish'); + logger.info(`${TAG} ImageAnimator Finish`); }) Text() { @@ -320,9 +355,8 @@ struct ContinueSwitch { .fontColor($r('sys.color.ohos_id_color_text_primary')) .accessibilityLevel('no') .padding({ - top: this.is2in1 ? CommonConstants.ITEM_LIST_PADDING_TOP_PC : CommonConstants.ITEM_LIST_PADDING_TOP, - bottom: this.is2in1 ? CommonConstants.ITEM_LIST_PADDING_BOTTOM_PC : - CommonConstants.ITEM_LIST_PADDING_BOTTOM + top: this.is2in1 ? CommonConstants.ITEM_LIST_PADDING_TOP_PC : this.phoneSwitchTextTopMargin, + bottom: this.is2in1 ? CommonConstants.ITEM_LIST_PADDING_BOTTOM_PC : this.phoneSwitchTextBottomMargin }) Toggle({ type: ToggleType.Switch, isOn: this.isSwitchOn }) @@ -331,17 +365,17 @@ struct ContinueSwitch { .hoverEffect(HoverEffect.None) .enabled(this.isEnabled) .onChange((isOn: boolean) => { - logger.info(TAG + 'isOn:' + isOn); + logger.info(`${TAG} isOn: ${isOn}`); this.isSwitchOn = isOn; AppStorage.setAndLink('isSwitchOn', isOn); if (isOn) { let status: boolean = settings.setValueSync(context, CommonConstants.CONTINUE_SWITCH_KEY, switchState.open, settings.domainName.USER_SECURITY); - logger.info(TAG + 'is set success :' + status + '; set:Continue_Switch_Status is open'); + logger.info(`${TAG} is set success :${status}; set:Continue_Switch_Status is open`); } else { let status: boolean = settings.setValueSync(context, CommonConstants.CONTINUE_SWITCH_KEY, switchState.close, settings.domainName.USER_SECURITY); - logger.info(TAG + 'is set success :' + status + '; set:Continue_Switch_Status is close'); + logger.info(`${TAG} is set success :${status}; set:Continue_Switch_Status is close`); } }) } @@ -421,7 +455,7 @@ struct ContinueSwitch { logger.info('Scroll Stop'); }) .onAreaChange((oldArea: Area, newArea: Area) => { - logger.info(TAG + 'Scroll, oldArea.height = ' + oldArea.height + ', newArea.height = ' + newArea.height); + logger.info(`${TAG} Scroll, oldArea.height = ${oldArea.height}, newArea.height = ${newArea.height}`); }) } @@ -437,10 +471,10 @@ struct ContinueSwitch { .height('100%') .backgroundColor($r('sys.color.ohos_id_color_sub_background')) .onAreaChange((oldArea: Area, newArea: Area) => { - logger.info(TAG + 'build column , oldArea.height = ' + oldArea.height + ', newArea.height = ' + newArea.height); + logger.info(`${TAG} build column , oldArea.height = ${oldArea.height}, newArea.height = ${newArea.height}`); this.getImageAnimatorSize(newArea.height, newArea.width); - logger.info(TAG + 'this.shortSideSize = ' + this.shortSideSize + ', this.imageAnimatorWidth = ' + - this.imageAnimatorWidth + ', this.imageAnimatorHeight = ' + this.imageAnimatorHeight); + logger.info(`${TAG} this.shortSideSize = ${this.shortSideSize}, this.imageAnimatorWidth = + ${this.imageAnimatorWidth}, this.imageAnimatorHeight = ${this.imageAnimatorHeight}`); }) } @@ -458,16 +492,6 @@ struct ContinueSwitch { return (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default'); } - private getSymbolSize(): Length { - logger.info(TAG + 'getSymbolSize in'); - let fontSizeScale: number = AppStorage.get('currentFontSizeScale') as number; - logger.info(TAG + 'getSymbolSize : fontSizeScale =' + fontSizeScale); - if (fontSizeScale >= 2) { - return `${CommonConstants.SYMBOL_INFO_CIRCLE * 2}vp` - } - return CommonConstants.SYMBOL_INFO_CIRCLE; - } - private refreshFoldStatus(foldStatus: display.FoldStatus): void { logger.info(`${TAG} refreshFoldStatus in. foldStatus: ${foldStatus}. startReason: ${this.startReason}`); if (this.startReason === 'from_search') { -- Gitee From 3b5cce400d7bcf1696f0d5f36b1df53cb685b363 Mon Sep 17 00:00:00 2001 From: dengxiaoyu Date: Mon, 21 Oct 2024 17:41:22 +0800 Subject: [PATCH 2/4] fix switch list changed by fontsize Signed-off-by: dengxiaoyu --- application/entry/src/main/ets/pages/ContinueSwitch.ets | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/entry/src/main/ets/pages/ContinueSwitch.ets b/application/entry/src/main/ets/pages/ContinueSwitch.ets index dfe805c7..b627f35a 100644 --- a/application/entry/src/main/ets/pages/ContinueSwitch.ets +++ b/application/entry/src/main/ets/pages/ContinueSwitch.ets @@ -66,6 +66,8 @@ struct ContinueSwitch { @State isEnabled: boolean = true; @State isShowBack: boolean = true; @StorageProp('currentFontSizeScale') @Watch('onFontSizeScaleChange') fontSizeScale: number = 1; + @State phoneSwitchTextTopMargin : string = '17vp'; + @State phoneSwitchTextBottomMargin : string = '18vp'; private listener: mediaQuery.MediaQueryListener = mediaQuery.matchMediaSync('(dark-mode:true)'); private extContext?: common.UIExtensionContext; private scroller: Scroller = new Scroller(); -- Gitee From b88cc77a3a248936792d002332a06d74ba0c40c0 Mon Sep 17 00:00:00 2001 From: dengxiaoyu Date: Mon, 21 Oct 2024 18:15:58 +0800 Subject: [PATCH 3/4] fix switch list changed by fontsize Signed-off-by: dengxiaoyu --- .../entry/src/main/ets/common/constants/CommonConstants.ets | 2 +- application/entry/src/main/ets/pages/ContinueSwitch.ets | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/entry/src/main/ets/common/constants/CommonConstants.ets b/application/entry/src/main/ets/common/constants/CommonConstants.ets index 1fbfb260..972bf525 100644 --- a/application/entry/src/main/ets/common/constants/CommonConstants.ets +++ b/application/entry/src/main/ets/common/constants/CommonConstants.ets @@ -37,7 +37,7 @@ export default class CommonConstants { public static readonly ITEM_LIST_PADDING_TOP: number = 17; public static readonly ITEM_LIST_PADDING_BOTTOM: number = 18; public static readonly CONTINUE_SWITCH_KEY: string = 'Continue_Switch_Status'; - public static readonly CONTINUE_SWITCH_KEY: string = 'persist.sys.font_scale_for_user0'; + public static readonly FONT_SIZE_SCALE_PARAM: string = 'persist.sys.font_scale_for_user0'; // Tips public static readonly TIPS_TYPE: string = '105'; public static readonly FUN_NUM = 'SF-20005815_f101'; diff --git a/application/entry/src/main/ets/pages/ContinueSwitch.ets b/application/entry/src/main/ets/pages/ContinueSwitch.ets index b627f35a..e0927b33 100644 --- a/application/entry/src/main/ets/pages/ContinueSwitch.ets +++ b/application/entry/src/main/ets/pages/ContinueSwitch.ets @@ -190,7 +190,7 @@ struct ContinueSwitch { }).catch((err: BusinessError) => { logger.error(`${TAG} getForegroundOsAccountLocalId errCode: ${err?.code}`); }); - } catch (e) { + } catch (err) { logger.error(`${TAG} getForegroundOsAccountLocalId exception: ${err?.message}`); } } @@ -210,7 +210,7 @@ struct ContinueSwitch { }).catch((err: BusinessError) => { logger.error(`${TAG} queryOsAccountById errCode: ${err?.code}`); }); - } catch (e) { + } catch (err) { logger.error(`${TAG} queryOsAccountById exception: ${err?.message}`); } } -- Gitee From 3248c30fabada46f42433af3c78dfa04624ac2f8 Mon Sep 17 00:00:00 2001 From: dengxiaoyu Date: Mon, 21 Oct 2024 19:33:58 +0800 Subject: [PATCH 4/4] fix switch list changed by fontsize Signed-off-by: dengxiaoyu --- .../entry/src/main/ets/common/constants/CommonConstants.ets | 2 +- application/entry/src/main/ets/pages/ContinueSwitch.ets | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/application/entry/src/main/ets/common/constants/CommonConstants.ets b/application/entry/src/main/ets/common/constants/CommonConstants.ets index 972bf525..1f1c2c71 100644 --- a/application/entry/src/main/ets/common/constants/CommonConstants.ets +++ b/application/entry/src/main/ets/common/constants/CommonConstants.ets @@ -42,7 +42,7 @@ export default class CommonConstants { public static readonly TIPS_TYPE: string = '105'; public static readonly FUN_NUM = 'SF-20005815_f101'; // Symbol - public static readonly SYMBOL_INFO_CIRCLE: number = 14; + public static readonly SYMBOL_INFO_CIRCLE: string = '14vp'; public static readonly SYMBOL_MARGIN_RIGHT: number = 4; // Update prompt text public static readonly UPDATE_PROMPT_LINE_HEIGHT: number = 16; diff --git a/application/entry/src/main/ets/pages/ContinueSwitch.ets b/application/entry/src/main/ets/pages/ContinueSwitch.ets index e0927b33..55fe08ca 100644 --- a/application/entry/src/main/ets/pages/ContinueSwitch.ets +++ b/application/entry/src/main/ets/pages/ContinueSwitch.ets @@ -406,6 +406,9 @@ struct ContinueSwitch { .fontSize(CommonConstants.SYMBOL_INFO_CIRCLE) .fontColor([$r('sys.color.ohos_id_color_activated')]) .margin({ right: CommonConstants.SYMBOL_MARGIN_RIGHT }) + .width(CommonConstants.SYMBOL_INFO_CIRCLE) + .height(CommonConstants.SYMBOL_INFO_CIRCLE) + .accessibilityLevel('no') Text($r('app.string.update_version_prompt')) .fontSize($r('sys.float.ohos_id_text_size_body3')) -- Gitee