mirror of
https://gitee.com/openharmony/distributedhardware_distributed_hardware_fwk
synced 2025-02-17 07:11:08 +00:00
!806 fix:维语类镜像语言,图标与文字间距误差
Merge pull request !806 from dengxiaoyu/master
This commit is contained in:
commit
f17a57fbd3
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user