From efb12e99912ef1d11a4c6c8c65f52b26a43a7602 Mon Sep 17 00:00:00 2001 From: fanchenxuan Date: Thu, 13 Oct 2022 17:42:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=85=A8=E5=B1=80=E5=BC=B9=E7=AA=97UI?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fanchenxuan --- permissionmanager/src/main/ets/common/components/dialog.ets | 1 + .../src/main/ets/pages/authority-tertiary-groups.ets | 5 ++++- permissionmanager/src/main/ets/pages/authority-tertiary.ets | 3 ++- permissionmanager/src/main/ets/pages/globalSwitch.ets | 3 ++- .../src/main/resources/zh_CN/element/string.json | 4 ++-- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/permissionmanager/src/main/ets/common/components/dialog.ets b/permissionmanager/src/main/ets/common/components/dialog.ets index df940fd..2a1770a 100644 --- a/permissionmanager/src/main/ets/common/components/dialog.ets +++ b/permissionmanager/src/main/ets/common/components/dialog.ets @@ -59,6 +59,7 @@ export struct globalDialog { Text(globalThis.currentPermissionGroup == 'CAMERA' ? $r('app.string.close_camera') : $r('app.string.close_microphone')) .fontSize(Constants.TEXT_BIG_FONT_SIZE) .fontColor($r('app.color.label_color')) + .fontWeight(FontWeight.Medium) .lineHeight(Constants.TEXT_BIG_LINE_HEIGHT) .height(Constants.ROW_HEIGHT) .width(Constants.FULL_WIDTH) diff --git a/permissionmanager/src/main/ets/pages/authority-tertiary-groups.ets b/permissionmanager/src/main/ets/pages/authority-tertiary-groups.ets index fc32f90..8aad7aa 100644 --- a/permissionmanager/src/main/ets/pages/authority-tertiary-groups.ets +++ b/permissionmanager/src/main/ets/pages/authority-tertiary-groups.ets @@ -193,10 +193,12 @@ struct applicationItem { Text(item.labelId) .fontSize(Constants.TEXT_MIDDLE_FONT_SIZE) .fontColor($r('app.color.text_color')) + .fontWeight(FontWeight.Medium) .flexGrow(Constants.FLEX_GROW) if (polymorphismGroup.indexOf(globalThis.currentPermissionGroup) == -1) { Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn[item.index] }) - .selectedColor($r('app.color.toggle_color')) + .selectedColor($r('app.color.button_color')) + .padding({ right: 0 }) .width(Constants.AUTHORITY_TOGGLE_WIDTH) .height(Constants.AUTHORITY_TOGGLE_HEIGHT) .onChange((isOn: boolean) => { @@ -445,6 +447,7 @@ struct applicationItem { Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Text(globalThis.currentPermissionGroup == "CAMERA" ? $r('app.string.camera') : $r('app.string.microphone')) .fontSize(Constants.TEXT_MIDDLE_FONT_SIZE).fontColor($r('app.color.label_color')) + .fontWeight(FontWeight.Medium) Row() { Toggle({ type: ToggleType.Switch, isOn: this.globalIsOn }) .selectedColor($r('app.color.button_color')) diff --git a/permissionmanager/src/main/ets/pages/authority-tertiary.ets b/permissionmanager/src/main/ets/pages/authority-tertiary.ets index fdb1d01..33b2ae8 100644 --- a/permissionmanager/src/main/ets/pages/authority-tertiary.ets +++ b/permissionmanager/src/main/ets/pages/authority-tertiary.ets @@ -139,7 +139,8 @@ struct applicationItem { .fontColor($r('app.color.label_color')) .flexGrow(Constants.FLEX_GROW) Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn[item.index] }) - .selectedColor($r('app.color.toggle_color')) + .selectedColor($r('app.color.button_color')) + .padding({ right: 0 }) .width(Constants.AUTHORITY_TOGGLE_WIDTH) .height(Constants.AUTHORITY_TOGGLE_HEIGHT) .onChange((isOn: boolean) => { diff --git a/permissionmanager/src/main/ets/pages/globalSwitch.ets b/permissionmanager/src/main/ets/pages/globalSwitch.ets index b0c85d5..1a53b4d 100644 --- a/permissionmanager/src/main/ets/pages/globalSwitch.ets +++ b/permissionmanager/src/main/ets/pages/globalSwitch.ets @@ -31,7 +31,7 @@ const CAMERA = 'camera' @Entry @Component -export struct globalSwitch { +struct globalSwitch { privacyDialogController: CustomDialogController = new CustomDialogController({ builder: globalDialog(), autoCancel: false, @@ -58,6 +58,7 @@ struct globalDialog { $r('app.string.global_title_camera_and_microphone')) .fontSize(Constants.TEXT_BIG_FONT_SIZE) .fontColor($r('app.color.label_color')) + .fontWeight(FontWeight.Medium) .lineHeight(Constants.TEXT_BIG_LINE_HEIGHT) .height(Constants.ROW_HEIGHT) .width(Constants.FULL_WIDTH) diff --git a/permissionmanager/src/main/resources/zh_CN/element/string.json b/permissionmanager/src/main/resources/zh_CN/element/string.json index 3e85ef9..ee41e2f 100644 --- a/permissionmanager/src/main/resources/zh_CN/element/string.json +++ b/permissionmanager/src/main/resources/zh_CN/element/string.json @@ -194,11 +194,11 @@ }, { "name": "close_microphone_desc", - "value": "关闭后,所有应用服务都将无法正常使用麦克风通话、录制音频或进行语音唤醒。如需恢复,请打开麦克风开关。" + "value": "关闭后,所有应用服务都将无法正常使用麦克风通话、录制音频或进行语音唤醒。若需恢复,请打开麦克风开关。" }, { "name": "close_camera_desc", - "value": "关闭后,所有应用服务都将无法正常使用摄像头拍摄照片、视频或进行人脸识别。如需恢复,请打开摄像头开关。" + "value": "关闭后,所有应用服务都将无法正常使用摄像头拍摄照片、视频或进行人脸识别。若需恢复,请打开摄像头开关。" } ] } \ No newline at end of file -- Gitee From 42a3128ecb6d2be1f8880d0970ebee3184a004b8 Mon Sep 17 00:00:00 2001 From: fanchenxuan Date: Mon, 17 Oct 2022 20:28:25 +0800 Subject: [PATCH 2/2] margin-fix Signed-off-by: fanchenxuan --- permissionmanager/src/main/ets/common/utils/constant.ets | 1 + permissionmanager/src/main/ets/pages/dialogPlus.ets | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/permissionmanager/src/main/ets/common/utils/constant.ets b/permissionmanager/src/main/ets/common/utils/constant.ets index 3075173..0352e1c 100644 --- a/permissionmanager/src/main/ets/common/utils/constant.ets +++ b/permissionmanager/src/main/ets/common/utils/constant.ets @@ -307,6 +307,7 @@ export default class Constants { static DIALOG_REQ_FONT_SIZE = 16; static DIALOG_REQ_MARGIN_TOP = 16; static DIALOG_REQ_MARGIN_LEFT = 24; + static DIALOG_REQ_MARGIN_RIGHT = 24; static DIALOG_REQ_LINE_HEIGHT = 22; // description text of dialog diff --git a/permissionmanager/src/main/ets/pages/dialogPlus.ets b/permissionmanager/src/main/ets/pages/dialogPlus.ets index 5aef9df..2904b7e 100644 --- a/permissionmanager/src/main/ets/pages/dialogPlus.ets +++ b/permissionmanager/src/main/ets/pages/dialogPlus.ets @@ -96,7 +96,8 @@ struct PermissionDialog { .lineHeight(Constants.DIALOG_REQ_LINE_HEIGHT) .margin({ top: Constants.DIALOG_REQ_MARGIN_TOP, - left: Constants.DIALOG_REQ_MARGIN_LEFT + left: Constants.DIALOG_REQ_MARGIN_LEFT, + right: Constants.DIALOG_REQ_MARGIN_RIGHT }) } } -- Gitee