mirror of
https://gitee.com/openharmony/applications_permission_manager
synced 2024-11-27 05:00:33 +00:00
commit
08f4e185c9
@ -4,13 +4,14 @@
|
|||||||
"app": {
|
"app": {
|
||||||
"bundleName": "com.ohos.permissionmanager",
|
"bundleName": "com.ohos.permissionmanager",
|
||||||
"vendor": "example",
|
"vendor": "example",
|
||||||
"versionCode": 1000064,
|
"versionCode": 1000065,
|
||||||
"versionName": "1.6.4",
|
"versionName": "1.6.5",
|
||||||
"icon": "$media:app_icon",
|
"icon": "$media:app_icon",
|
||||||
"label": "$string:app_name",
|
"label": "$string:app_name",
|
||||||
"minAPIVersion": 12,
|
"minAPIVersion": 12,
|
||||||
"targetAPIVersion": 12,
|
"targetAPIVersion": 12,
|
||||||
"distributedNotificationEnabled": true,
|
"distributedNotificationEnabled": true,
|
||||||
"apiReleaseType": "Beta5"
|
"apiReleaseType": "Beta5",
|
||||||
|
"configuration": "$profile:configuration"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,13 +16,14 @@
|
|||||||
"app": {
|
"app": {
|
||||||
"bundleName": "com.ohos.permissionmanager",
|
"bundleName": "com.ohos.permissionmanager",
|
||||||
"vendor": "example",
|
"vendor": "example",
|
||||||
"versionCode": 1000064,
|
"versionCode": 1000065,
|
||||||
"versionName": "1.6.4",
|
"versionName": "1.6.5",
|
||||||
"icon": "$media:app_icon",
|
"icon": "$media:app_icon",
|
||||||
"label": "$string:app_name",
|
"label": "$string:app_name",
|
||||||
"minAPIVersion": 12,
|
"minAPIVersion": 12,
|
||||||
"targetAPIVersion": 12,
|
"targetAPIVersion": 12,
|
||||||
"distributedNotificationEnabled": true,
|
"distributedNotificationEnabled": true,
|
||||||
"apiReleaseType": "Beta5"
|
"apiReleaseType": "Beta5",
|
||||||
|
"configuration": "$profile:configuration"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
AppScope/resources/base/profile/configuration.json
Normal file
6
AppScope/resources/base/profile/configuration.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"configuration": {
|
||||||
|
"fontSizeScale": "followSystem",
|
||||||
|
"fontSizeMaxScale": "2"
|
||||||
|
}
|
||||||
|
}
|
@ -135,6 +135,7 @@ export default class Constants {
|
|||||||
public static DIVIDER_MARGIN_RIGHT_PERMISSION = 52;
|
public static DIVIDER_MARGIN_RIGHT_PERMISSION = 52;
|
||||||
public static DIVIDER_MARGIN_RIGHT_APPLICATION = 68;
|
public static DIVIDER_MARGIN_RIGHT_APPLICATION = 68;
|
||||||
public static DIALOG_TITLE_MAX_SCALE = 2;
|
public static DIALOG_TITLE_MAX_SCALE = 2;
|
||||||
|
public static DIALOG_TEXT_MAX_SCALE = 3.2;
|
||||||
|
|
||||||
// application-secondary, authority-secondary
|
// application-secondary, authority-secondary
|
||||||
public static FLEX_MARGIN_TOP = 8;
|
public static FLEX_MARGIN_TOP = 8;
|
||||||
|
@ -278,7 +278,7 @@ export function setAvoidArea(proxy: uiExtensionHost.UIExtensionHostWindowProxy)
|
|||||||
export function getFontSizeScale(): number {
|
export function getFontSizeScale(): number {
|
||||||
const FONT_SIZE_SCALE_PARAM = 'persist.sys.font_scale_for_user0';
|
const FONT_SIZE_SCALE_PARAM = 'persist.sys.font_scale_for_user0';
|
||||||
let fontSizeScale = Number.parseFloat(systemParameterEnhance.getSync(FONT_SIZE_SCALE_PARAM, '1'));
|
let fontSizeScale = Number.parseFloat(systemParameterEnhance.getSync(FONT_SIZE_SCALE_PARAM, '1'));
|
||||||
return fontSizeScale;
|
return fontSizeScale >= Constants.DIALOG_TITLE_MAX_SCALE ? Constants.DIALOG_TITLE_MAX_SCALE : fontSizeScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getLimitFontSize(
|
export function getLimitFontSize(
|
||||||
|
@ -89,8 +89,8 @@ struct dialogPlusPage {
|
|||||||
Column() {
|
Column() {
|
||||||
if ((this.initStatus != Constants.INIT_NEED_TO_WAIT) && this.verify()) {
|
if ((this.initStatus != Constants.INIT_NEED_TO_WAIT) && this.verify()) {
|
||||||
Image(this.currentGroup().icon)
|
Image(this.currentGroup().icon)
|
||||||
.width(Constants.DIALOG_ICON_WIDTH * getFontSizeScale())
|
.width(Constants.DIALOG_ICON_WIDTH)
|
||||||
.height(Constants.DIALOG_ICON_HEIGHT * getFontSizeScale())
|
.height(Constants.DIALOG_ICON_HEIGHT)
|
||||||
.fillColor($r('sys.color.ohos_id_color_text_primary'))
|
.fillColor($r('sys.color.ohos_id_color_text_primary'))
|
||||||
.margin({ top: Constants.DIALOG_ICON_MARGIN_TOP })
|
.margin({ top: Constants.DIALOG_ICON_MARGIN_TOP })
|
||||||
if (this.grantGroups.length > 1) {
|
if (this.grantGroups.length > 1) {
|
||||||
@ -162,6 +162,7 @@ struct dialogPlusPage {
|
|||||||
.textAlign(TextAlign.Start)
|
.textAlign(TextAlign.Start)
|
||||||
.fontColor($r('sys.color.font_primary'))
|
.fontColor($r('sys.color.font_primary'))
|
||||||
.fontSize($r('sys.float.Body_L'))
|
.fontSize($r('sys.float.Body_L'))
|
||||||
|
.maxFontScale(Constants.DIALOG_TEXT_MAX_SCALE)
|
||||||
.margin({
|
.margin({
|
||||||
left: Constants.DIALOG_DESP_MARGIN_LEFT,
|
left: Constants.DIALOG_DESP_MARGIN_LEFT,
|
||||||
right: Constants.DIALOG_DESP_MARGIN_RIGHT,
|
right: Constants.DIALOG_DESP_MARGIN_RIGHT,
|
||||||
|
@ -102,8 +102,9 @@ struct SecurityDialog {
|
|||||||
Column() {
|
Column() {
|
||||||
Column() {
|
Column() {
|
||||||
SymbolGlyph($r('sys.symbol.person_shield_fill'))
|
SymbolGlyph($r('sys.symbol.person_shield_fill'))
|
||||||
.constraintSize({ minWidth: Constants.SECURITY_ICON_WIDTH, minHeight: Constants.SECURITY_ICON_HEIGHT })
|
.width(Constants.SECURITY_ICON_WIDTH)
|
||||||
.fontSize(Constants.FONT_SIZE_28)
|
.height(Constants.SECURITY_ICON_HEIGHT)
|
||||||
|
.fontSize(Constants.FONT_SIZE_28 / getFontSizeScale())
|
||||||
.fontColor([$r('sys.color.brand')])
|
.fontColor([$r('sys.color.brand')])
|
||||||
.border({
|
.border({
|
||||||
width: Constants.BORDER_WIDTH_1,
|
width: Constants.BORDER_WIDTH_1,
|
||||||
@ -112,14 +113,9 @@ struct SecurityDialog {
|
|||||||
})
|
})
|
||||||
.padding(Constants.PADDING_10)
|
.padding(Constants.PADDING_10)
|
||||||
Image(this.securityParams[this.index].icon)
|
Image(this.securityParams[this.index].icon)
|
||||||
.width(Constants.IMAGE_LENGTH_20 * getFontSizeScale())
|
.width(Constants.IMAGE_LENGTH_20)
|
||||||
.height(Constants.IMAGE_LENGTH_20 * getFontSizeScale())
|
.height(Constants.IMAGE_LENGTH_20)
|
||||||
.position({
|
.position({ x: Constants.IMAGE_POSITION_28, y: Constants.IMAGE_POSITION_28 })
|
||||||
x: (Constants.FONT_SIZE_28 - Constants.IMAGE_LENGTH_20) * getFontSizeScale() +
|
|
||||||
Constants.PADDING_10 * Constants.PADDING_TWICE,
|
|
||||||
y: (Constants.FONT_SIZE_28 - Constants.IMAGE_LENGTH_20) * getFontSizeScale() +
|
|
||||||
Constants.PADDING_10 * Constants.PADDING_TWICE
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
.backgroundColor($r('app.color.icon_bg'))
|
.backgroundColor($r('app.color.icon_bg'))
|
||||||
.borderRadius($r('sys.float.ohos_id_corner_radius_default_m'))
|
.borderRadius($r('sys.float.ohos_id_corner_radius_default_m'))
|
||||||
@ -158,6 +154,7 @@ struct SecurityDialog {
|
|||||||
.fontColor($r('sys.color.font_primary'))
|
.fontColor($r('sys.color.font_primary'))
|
||||||
.fontSize($r('sys.float.Body_L'))
|
.fontSize($r('sys.float.Body_L'))
|
||||||
.lineHeight(Constants.TEXT_SMALL_LINE_HEIGHT)
|
.lineHeight(Constants.TEXT_SMALL_LINE_HEIGHT)
|
||||||
|
.maxFontScale(Constants.DIALOG_TEXT_MAX_SCALE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.clip(true)
|
.clip(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user