!806 fix:维语类镜像语言,图标与文字间距误差

Merge pull request !806 from dengxiaoyu/master
This commit is contained in:
openharmony_ci 2024-10-28 12:21:40 +00:00 committed by Gitee
commit f17a57fbd3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 17 additions and 7 deletions

View File

@ -2,8 +2,8 @@
"app": {
"bundleName": "com.ohos.dhardwareui",
"vendor": "example",
"versionCode": 10000025,
"versionName": "1.0.25",
"versionCode": 10000026,
"versionName": "1.0.26",
"icon": "$media:app_icon",
"label": "$string:app_name",
"minAPIVersion": 12,

View File

@ -16,8 +16,8 @@
"app": {
"bundleName": "com.ohos.dhardwareui",
"vendor": "example",
"versionCode": 10000025,
"versionName": "1.0.25",
"versionCode": 10000026,
"versionName": "1.0.26",
"icon": "$media:app_icon",
"label": "$string:app_name",
"minAPIVersion": 12,

View File

@ -53,6 +53,8 @@ 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;
// isMirrorLanguages
public static readonly MIRROR_LANGUAGES: Array<string> = ['ug'];
}
export enum FontSizeScale {

View File

@ -1,13 +1,13 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License');
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
@ -26,6 +26,7 @@ import { logger } from '../utils/Logger';
import { TipsJumpUtils } from '../utils/TipsJumpUtils';
import osAccount from '@ohos.account.osAccount';
import systemParameterEnhance from '@ohos.systemParameterEnhance';
import i18n from '@ohos.i18n';
const TAG = '[ContinueSwitch_Page] : ';
let context = getContext(this) as common.UIAbilityContext;
@ -385,7 +386,8 @@ struct ContinueSwitch {
.fontWeight(FontWeight.Medium)
.fontSize(CommonConstants.SYMBOL_INFO_CIRCLE)
.fontColor([$r('sys.color.ohos_id_color_activated')])
.margin({ right: CommonConstants.SYMBOL_MARGIN_RIGHT })
.margin(this.isMirrorLanguages() ? { left: CommonConstants.SYMBOL_MARGIN_RIGHT } :
{ right: CommonConstants.SYMBOL_MARGIN_RIGHT })
.width(CommonConstants.SYMBOL_INFO_CIRCLE)
.height(CommonConstants.SYMBOL_INFO_CIRCLE)
.accessibilityLevel('no')
@ -535,4 +537,10 @@ struct ContinueSwitch {
}
}
}
private isMirrorLanguages(): boolean {
logger.info(`${TAG} isMirrorLanguages in`);
let locale = new Intl.Locale(i18n.System.getSystemLanguage()).toString();
return CommonConstants.MIRROR_LANGUAGES.includes(locale);
}
}