diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/components/dialog.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/components/dialog.ets index 5dc2991424642587cd270cfd9d1a12ab0706b9cf..921df5f1f8f6e9960edcb891948b1a5c4d6e4b02 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/components/dialog.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/components/dialog.ets @@ -27,6 +27,7 @@ import { permissionGroups, showSubpermissionsGrop } from "../model/permissionGro .fontColor($r('app.color.button_color')) .fontWeight(FontWeight.Medium) .height(Constants.BUTTON_HEIGHT) + .width(Constants.BUTTON_WIDTH) } @CustomDialog @@ -92,7 +93,7 @@ export struct privacyDialog { } } Row() { - Flex({ justifyContent: FlexAlign.SpaceAround, alignItems: ItemAlign.Center }) { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Button('禁止') .fontSize(Constants.BUTTON_FONT_SIZE) .onClick(() => { @@ -100,7 +101,7 @@ export struct privacyDialog { if (this.count === this.reqPerms.length) { this.controller.close() } - }).customizeButton() + }).customizeButton().margin({ left: Constants.BUTTON_MARGIN_LEFT }) Text('|').fontSize(Constants.BUTTON_DIVIDER_FONT_SIZE).fontColor($r('app.color.divider_color')) Button('允许') .fontSize(Constants.BUTTON_FONT_SIZE) @@ -109,7 +110,7 @@ export struct privacyDialog { if (this.count === this.reqPerms.length) { this.controller.close() } - }).customizeButton() + }).customizeButton().margin({ right: Constants.BUTTON_MARGIN_RIGHT }) } } } diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets index 1c544227f4227c4fb646a5436d64738a56a7c3b9..74e2d764ae57a5e011ff47abbdbc27f85488f4e6 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets @@ -15,7 +15,7 @@ export default class Constants { // icon of dialog - static DIALOG_ICON_WIDTH = 24; + static DIALOG_ICON_WIDTH = 26; static DIALOG_ICON_HEIGHT = 24; static DIALOG_ICON_MARGIN_TOP = 23; @@ -42,7 +42,10 @@ export default class Constants { static BUTTON_DIVIDER_FONT_SIZE = 24; static BUTTON_MARGIN_TOP = 8; static BUTTON_MARGIN_BOTTOM = 16; + static BUTTON_MARGIN_LEFT = 16; + static BUTTON_MARGIN_RIGHT = 16; static BUTTON_HEIGHT = 40; + static BUTTON_WIDTH = 177; static DIALOG_BORDER_RADIUS = 32; static DIALOG_HEIGHT = 186; diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets index f67a008265b51fe2e4ec90a87b193b9b5ac3f032..5682ea437b0654f40f3693a98e25b6304e338092 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets @@ -214,6 +214,13 @@ export default class Constants { static RADIO_BAN_INDEX = 1; static RADIO_BAN_GROUP_NAME = 'radio'; + //shape + static SHAPE_DIA = 24; + static SHAPE_BAN_DIA = 23; + static SHAPE_BAN_OFFSET = .5; + static SHAPE_ALLOW_DIA = 16; + static SHAPE_ALLOW_OFFSET = 4; + // utils static CHAR_CODE = 0; static UNI_MAX = 40869; diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-tertiary.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-tertiary.ets index fc2b5856888a75a1611df8202c574dbb525dcdba..ec4380c757a239177f8cc85dd7c0981b47a33bd1 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-tertiary.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-tertiary.ets @@ -332,16 +332,22 @@ struct mediaDocumentItem { .flexGrow(Constants.FLEX_GROW) if (this.isCheckList[item.index] === true) { Shape() { - Circle().width(24).height(24).fill('#1856d4').offset({ x: 0, y: 0 }) - Circle().width(16).height(16).fill('#ffffff').offset({ x: 4, y: 4 }) + Circle().width(Constants.SHAPE_DIA).height(Constants.SHAPE_DIA) + .fill($r("app.color.shape_allow_color")).offset({ x: 0, y: 0 }) + Circle().width(Constants.SHAPE_ALLOW_DIA).height(Constants.SHAPE_ALLOW_DIA) + .fill($r("app.color.default_background_color")) + .offset({ x: Constants.SHAPE_ALLOW_OFFSET, y: Constants.SHAPE_ALLOW_OFFSET }) } } else if (this.isCheckList[item.index] === false) { Shape() { - Circle().width(24).height(24).stroke('#000000').fill('#ffffff') + Circle().width(Constants.SHAPE_DIA).height(Constants.SHAPE_DIA) + .fill($r("app.color.shape_ban_color")).offset({ x: 0, y: 0 }) + Circle().width(Constants.SHAPE_BAN_DIA).height(Constants.SHAPE_BAN_DIA) + .fill($r("app.color.default_background_color")) + .offset({ x: Constants.SHAPE_BAN_OFFSET, y: Constants.SHAPE_BAN_OFFSET }) } } } - .backgroundColor($r('app.color.default_background_color')) .width(Constants.FULL_WIDTH) .height(Constants.LISTITEM_ROW_HEIGHT) .onClick(() => { diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/color.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/color.json index bb43a9402d1cb869a3198f08ec409e47ab6c5d14..338e7bda25dd09f972369c35c5d70d0f66a69510 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/color.json +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/color.json @@ -44,6 +44,14 @@ "name": "button_color", "value": "#007DFF" }, + { + "name": "shape_allow_color", + "value": "#1856D4" + }, + { + "name": "shape_ban_color", + "value": "#000000" + }, { "name": "first_font_color", "value": "#E6000000"