Merge branch 'master' of gitee.com:openharmony/applications_systemui into master

This commit is contained in:
lijinfengde123
2022-05-25 05:35:47 +00:00
committed by Gitee
32 changed files with 909 additions and 185 deletions
@@ -14,18 +14,20 @@
*/
import StyleManager from './StyleManager';
import deviceInfo from '@ohos.deviceInfo';
const TAG = 'Common-StyleConfiguration';
const deviceTypeInfo = deviceInfo.deviceType
export default class StyleConfiguration {
static getCommonStyle() {
const key: string = TAG + "-Common";
return StyleManager.getStyle(key, () => {
return {
statusBarFontSize: '16fp',
statusBarFontSize: deviceTypeInfo === 'phone' ? '12fp' : '16fp',
statusBarIconWidth: '24vp',
statusBarIconHeight: '24vp',
statusBarMarginLeftRight: '5vp',
statusBarMarginLeftRight: deviceTypeInfo === 'phone' ? '0vp' : '5vp',
};
});
}
@@ -56,78 +56,104 @@ export default struct AppItemComponent {
Text(this.appTitle)
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body1'))
.fontWeight(FontWeight.Medium)
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: $r('app.float.appitem_label_margin_t'), bottom: $r('app.float.appitem_label_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
top: $r('app.float.appitem_label_margin_t'),
bottom: $r('app.float.appitem_label_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
Row() {
if (this.appSwitch === 3) {
if (parseInt(this.appValue) == 0) {
Text($r('app.string.slot_unknown'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.visibility(Visibility.Visible)
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
bottom: $r('app.float.appitem_version_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
} else if (parseInt(this.appValue) == 1) {
Text($r('app.string.slot_social_communication'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.visibility(Visibility.Visible)
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
bottom: $r('app.float.appitem_version_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
} else if (parseInt(this.appValue) == 2) {
Text($r('app.string.slot_service_information'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.visibility(Visibility.Visible)
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
bottom: $r('app.float.appitem_version_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
} else if (parseInt(this.appValue) == 3) {
Text($r('app.string.slot_content_information'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.visibility(Visibility.Visible)
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
bottom: $r('app.float.appitem_version_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
} else if (parseInt(this.appValue) == 0xFFFF) {
Text($r('app.string.slot_other'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.visibility(Visibility.Visible)
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
bottom: $r('app.float.appitem_version_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
} else {
Text('')
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.visibility(Visibility.Visible)
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
bottom: $r('app.float.appitem_version_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
}
} else {
Text($r('app.string.version'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.visibility(Visibility.Visible)
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
.margin({
bottom: $r('app.float.appitem_version_margin_b'),
left: $r('app.float.page_notice_info_label_margin')
});
Text(this.appSummary)
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.textAlign(TextAlign.Start)
.maxLines(ConfigData.MAX_LINES_1)
@@ -180,6 +206,7 @@ export default struct AppItemComponent {
} else {
Toggle({ type: ToggleType.Switch, isOn: this.canNotice })
.align(Alignment.End)
.selectedColor($r("app.color.font_color_007DFF"))
.width($r('app.float.toggle_comp_width'))
.height($r('app.float.toggle_comp_height'))
.enabled(this.isCanChange)
@@ -43,7 +43,7 @@ struct HeadComponent {
Text(this.headName)
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('app.float.page_phrases_tittle_font'))
.fontWeight(FontWeight.Bold)
.fontWeight(FontWeight.Medium)
.width(ConfigData.WH_100_100)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
@@ -51,7 +51,6 @@ struct HeadComponent {
}
.width(ConfigData.WH_100_100)
.height($r('app.float.page_title_height'))
.margin({top:$r('app.float.page_header_margin_t')})
.alignItems(VerticalAlign.Center)
.align(Alignment.Start)
}
@@ -28,7 +28,7 @@ export default struct ItemComponent {
.fontColor($r('app.color.itemComp_title_color'))
.width(ConfigData.WH_45_100)
.textAlign(TextAlign.Start)
.fontWeight(FontWeight.Bold)
.fontWeight(FontWeight.Medium)
Blank()
Text(this.value)
.fontSize($r('app.float.itemComp_value_font'))
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import Log from '../../../../../../../../../common/src/main/ets/default/Log';
import ConfigData, {DoNotDisturbType} from '../../common/constants';
import ConfigData, { DoNotDisturbType } from '../../common/constants';
import ViewModel from '../../vm/noDisturbComponentViewModel'
const TAG = 'ManagementComponent-NoDisturbComponent';
@@ -52,8 +52,9 @@ export default struct NoDisturbComponent {
.fontSize($r('app.float.itemComp_titel_font'))
.fontColor($r('app.color.itemComp_title_color'))
.textAlign(TextAlign.Start)
.fontWeight(FontWeight.Bold)
.fontWeight(FontWeight.Medium)
}
Row() {
if (this.mRefreshCnt > 0) {
if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_ONCE) {
@@ -65,6 +66,7 @@ export default struct NoDisturbComponent {
.fontSize($r('app.float.itemComp_value_font'))
.fontColor($r('app.color.itemComp_font_color'))
.textAlign(TextAlign.Start)
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
} else if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_DAILY) {
Text($r('app.string.noDisturb_daily_label'))
.fontSize($r('app.float.itemComp_value_font'))
@@ -74,6 +76,7 @@ export default struct NoDisturbComponent {
.fontSize($r('app.float.itemComp_value_font'))
.fontColor($r('app.color.itemComp_font_color'))
.textAlign(TextAlign.Start)
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
} else if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_CLEARLY) {
Text($r('app.string.noDisturb_clearly_label'))
.fontSize($r('app.float.itemComp_value_font'))
@@ -83,11 +86,13 @@ export default struct NoDisturbComponent {
.fontSize($r('app.float.itemComp_value_font'))
.fontColor($r('app.color.itemComp_font_color'))
.textAlign(TextAlign.Start)
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
} else {
Text($r('app.string.noDisturb_closed'))
.fontSize($r('app.float.itemComp_value_font'))
.fontColor($r('app.color.itemComp_font_color'))
.textAlign(TextAlign.Start)
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
}
} else {
Blank();
@@ -106,6 +111,7 @@ export default struct NoDisturbComponent {
.align(Alignment.End)
.width($r('app.float.toggle_comp_width'))
.height($r('app.float.toggle_comp_height'))
.selectedColor($r("app.color.font_color_007DFF"))
.onChange((data) => {
Log.showInfo(TAG, `Toggle onChange param: data = ${data}`);
if (this.mPrevGetCnt == 0) {
@@ -124,8 +130,8 @@ export default struct NoDisturbComponent {
this.mViewModel.repeatMode = this.mViewModel.isEffective ? this.mPrevReapMode : DoNotDisturbType.TYPE_NONE;
if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_NONE) {
this.mViewModel.refreshDate.bind(this.mViewModel)(this.mViewModel.repeatMode,
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY),
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY));
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY),
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY));
} else {
this.mViewModel.refreshDate.bind(this.mViewModel)(this.mViewModel.repeatMode,
this.mPrevStartTime,
@@ -140,7 +146,7 @@ export default struct NoDisturbComponent {
.flexShrink(0)
.align(Alignment.End)
.alignItems(VerticalAlign.Center)
.padding({ right: $r('sys.float.ohos_id_max_padding_end') })
.padding({ right: $r('sys.float.ohos_id_default_padding_end') })
}
.width(ConfigData.WH_100_100)
.height($r('app.float.itemComp_noDisturb_height'))
@@ -33,7 +33,7 @@ export default struct SlotLstComponent {
Text($r('app.string.slotType'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.fontWeight(FontWeight.Bold)
.fontWeight(FontWeight.Medium)
.width(ConfigData.WH_100_100)
.maxLines(ConfigData.MAX_LINES_1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
@@ -34,11 +34,11 @@ export default struct SwitchComponent {
Text(this.title)
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body1'))
.fontWeight(FontWeight.Bold)
.fontWeight(FontWeight.Medium)
.align(Alignment.Start)
Text(this.describe)
.fontColor($r('sys.color.ohos_id_color_text_primary'))
.fontSize($r('sys.float.ohos_id_text_size_body1'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.align(Alignment.Start)
.visibility((this.describe ? true : false) ? Visibility.Visible : Visibility.None)
}.alignItems(HorizontalAlign.Start)
@@ -53,6 +53,8 @@ export default struct SwitchComponent {
Row() {
Toggle({ type: ToggleType.Switch, isOn: this.initState })
.align(Alignment.End)
.offset({ x: $r("app.float.noDisturb_offset_x"), y: 0 })
.selectedColor($r("app.color.font_color_007DFF"))
.width($r('app.float.toggle_comp_width'))
.height($r('app.float.toggle_comp_height'))
.enabled(this.isCanChange)
@@ -66,7 +68,7 @@ export default struct SwitchComponent {
.align(Alignment.End)
.padding({ right: $r('app.float.switchComp_padding_r') })
}.width(ConfigData.WH_100_100)
.height($r('app.float.switchComp_height') )
.height($r('app.float.switchComp_height'))
.border({ width: $r('app.float.border_width'), color: Color.White,
radius: $r('app.float.border_radius') })
.backgroundColor(Color.White)
@@ -355,6 +355,18 @@
{
"name": "noDisturb_margin_16",
"value": "16vp"
},
{
"name": "noDisturb_offset_x",
"value": "0"
},
{
"name": "noDisturb_text_margin_vertical",
"value": "0vp"
},
{
"name": "noDisturb_text_margin_right",
"value": "0vp"
}
]
}
@@ -0,0 +1,36 @@
{
"color": [
{
"name": "background_color",
"value": "#0xDCDCDC"
},
{
"name": "background_transparent",
"value": "#00000000"
},
{
"name": "appitem_label_fontcolor",
"value": "#333333"
},
{
"name": "appitem_version_fontcolor",
"value": "#999999"
},
{
"name": "divider_color",
"value": "#0C000000"
},
{
"name": "itemComp_title_color",
"value": "#182431"
},
{
"name": "itemComp_font_color",
"value": "#182431"
},
{
"name": "font_color_007DFF",
"value": "#007DFF"
}
]
}
@@ -0,0 +1,372 @@
{
"float": [
{
"name": "page_margin_l",
"value": "12pv"
},
{
"name": "page_margin_r",
"value": "12pv"
},
{
"name": "page_margin_t",
"value": "5"
},
{
"name": "page_margin_b",
"value": "5"
},
{
"name": "page_title_font",
"value": "24vp"
},
{
"name": "page_title_height",
"value": "56vp"
},
{
"name": "page_phrases_font",
"value": "14fp"
},
{
"name": "page_phrases_padding_t",
"value": "19vp"
},
{
"name": "applist_hieght",
"value": "476vp"
},
{
"name": "applist_hieght_phone",
"value": "800vp"
},
{
"name": "applist_hieght_bat",
"value": "584vp"
},
{
"name": "applist_hieght_bat_phone",
"value": "1022vp"
},
{
"name": "page_header_margin_t",
"value": "24vp"
},
{
"name": "applist_margin_t",
"value": "12vp"
},
{
"name": "page_phrases_height",
"value": "48vp"
},
{
"name": "page_phrases_tittle_font",
"value": "20fp"
},
{
"name": "dialog_title_height",
"value": "60vp"
},
{
"name": "dialog_title_font",
"value": "20fp"
},
{
"name": "dialog_title_margin_l",
"value": "50"
},
{
"name": "dialog_button_font",
"value": "20fp"
},
{
"name": "timeDialog_height",
"value": "310vp"
},
{
"name": "timeDialog_datePicker_height",
"value": "200vp"
},
{
"name": "repeatDialog_cont_font",
"value": "16fp"
},
{
"name": "repeatDialog_height",
"value": "320vp"
},
{
"name": "border_width",
"value": "1"
},
{
"name": "border_radius",
"value": "24vp"
},
{
"name": "image_border_radius",
"value": "15"
},
{
"name": "appitem_item_height",
"value": "72vp"
},
{
"name": "appitem_header_icon_width",
"value": "24vp"
},
{
"name": "appitem_header_icon_height",
"value": "24vp"
},
{
"name": "appitem_icon_width",
"value": "48vp"
},
{
"name": "appitem_icon_height",
"value": "48vp"
},
{
"name": "appitem_icon_info_margin_r",
"value": "4vp"
},
{
"name": "appitem_icon_info_list_margin_r",
"value": "4vp"
},
{
"name": "appitem_icon_margin_r",
"value": "16vp"
},
{
"name": "appitem_label_margin_t",
"value": "10"
},
{
"name": "appitem_label_margin_b",
"value": "5"
},
{
"name": "appitem_label_font",
"value": "20vp"
},
{
"name": "appitem_version_font",
"value": "18vp"
},
{
"name": "appitem_version_margin_b",
"value": "10"
},
{
"name": "appitem_version_margin_r",
"value": "10"
},
{
"name": "arrow_icon_width",
"value": "40"
},
{
"name": "arrow_icon_height",
"value": "40"
},
{
"name": "toggle_comp_width",
"value": "44vp"
},
{
"name": "toggle_comp_height",
"value": "44vp"
},
{
"name": "toggle_check_width",
"value": "25"
},
{
"name": "divider_stroke_width",
"value": "1"
},
{
"name": "divider_margin_l_info",
"value": "64vp"
},
{
"name": "divider_margin_l",
"value": "12vp"
},
{
"name": "divider_margin_r",
"value": "12vp"
},
{
"name": "divider_height",
"value": "20"
},
{
"name": "itemComp_height",
"value": "48vp"
},
{
"name": "itemComp_noDisturb_height",
"value": "72vp"
},
{
"name": "itemComp_titel_font",
"value": "16vp"
},
{
"name": "itemComp_value_font",
"value": "14fp"
},
{
"name": "itemComp_image_width",
"value": "12vp"
},
{
"name": "itemComp_image_height",
"value": "24vp"
},
{
"name": "itemComp_image_margin_left",
"value": "30"
},
{
"name": "itemComp_padding_l",
"value": "12vp"
},
{
"name": "itemComp_padding_r",
"value": "12vp"
},
{
"name": "itemComp_margin_b",
"value": "8vp"
},
{
"name": "slotComp_font",
"value": "20"
},
{
"name": "page_header_icon_margin_l",
"value": "18vp"
},
{
"name": "page_header_margin_l",
"value": "18vp"
},
{
"name": "slotComp_image_width",
"value": "18vp"
},
{
"name": "slotComp_image_height",
"value": "18vp"
},
{
"name": "slotComp_margin_t",
"value": "20"
},
{
"name": "switchComp_titel_font",
"value": "20"
},
{
"name": "switchComp_height",
"value": "64vp"
},
{
"name": "switchComp_padding_r",
"value": "12vp"
},
{
"name": "slotComp_height",
"value": "56vp"
},
{
"name": "distance_24",
"value": "15"
},
{
"name": "page_notice_title_margin_t",
"value": "8vp"
},
{
"name": "page_notice_part_margin_t",
"value": "8vp"
},
{
"name": "page_notice_row_margin_t",
"value": "18vp"
},
{
"name": "page_notice_app_item_row_height",
"value": "72vp"
},
{
"name": "appitem_notice_info_icon_width_l",
"value": "64vp"
},
{
"name": "appitem_notice_info_icon_height_l",
"value": "64vp"
},
{
"name": "appitem_notice_info_icon_width",
"value": "48vp"
},
{
"name": "appitem_notice_info_icon_height",
"value": "48vp"
},
{
"name": "appitem_notice_infopop_icon_width",
"value": "22vp"
},
{
"name": "appitem_notice_infopop_icon_height",
"value": "22vp"
},
{
"name": "appitem_notice_infopop_icon_margin_r",
"value": "24vp"
},
{
"name": "appitem_notice_info_icon_margin_r",
"value": "12vp"
},
{
"name": "page_notice_info_label_margin",
"value": "12vp"
},
{
"name": "notice_title_height",
"value": "48vp"
},
{
"name": "notice_row_height",
"value": "56vp"
},
{
"name": "noDisturb_margin_lf",
"value": "4vp"
},
{
"name": "noDisturb_margin_16",
"value": "16vp"
},
{
"name": "noDisturb_offset_x",
"value": "-18"
},
{
"name": "noDisturb_text_margin_vertical",
"value": "2vp"
},
{
"name": "noDisturb_text_margin_right",
"value": "12vp"
}
]
}
@@ -15,6 +15,9 @@
import Constants from '../../common/constants';
import Log from '../../../../../../../../../../common/src/main/ets/default/Log';
import deviceInfo from '@ohos.deviceInfo';
const deviceTypeInfo = deviceInfo.deviceType;
const TAG = 'NoticeItem-Confirm';
@@ -30,53 +33,61 @@ export default struct ConfirmDialog {
build() {
Column() {
Row() {
Text(this.title)
.fontSize($r('app.float.confirm_title_fontsize'))
.fontWeight(FontWeight.Bold)
}.width($r('app.float.confirm_dialog_row_width'))
.margin({ top: $r('app.float.title_font_margin_t') })
Column() {
Row() {
Text(this.title)
.fontSize($r('app.float.confirm_title_fontsize'))
.fontWeight(FontWeight.Bold)
}.width($r('app.float.confirm_dialog_row_width'))
.margin({ top: $r('app.float.title_font_margin_t') })
Row() {
Text($r('app.string.confirm_message', this.bundleName))
.fontSize($r('app.float.confirm_cont_fontsize'))
}.width($r('app.float.confirm_dialog_row_width'))
.margin({ top: $r('app.float.message_font_margin_t') })
Row() {
Column() {
Text($r('app.string.cancel'))
Row() {
Text($r('app.string.confirm_message', this.bundleName))
.fontSize($r('app.float.confirm_cont_fontsize'))
.fontColor(Color.Blue)
}.onClick(() => {
this.controller.close();
})
.alignItems(HorizontalAlign.Center)
.width($r('app.float.confirm_dialog_button_width'))
}.width($r('app.float.confirm_dialog_row_width'))
.margin({ top: $r('app.float.message_font_margin_t') })
Divider()
.vertical(true)
.color($r('app.color.confirm_divider_color'))
.strokeWidth(1)
.height($r('app.float.confirm_divider_height'))
Column() {
Text($r('app.string.close'))
.fontSize($r('app.float.confirm_cont_fontsize'))
.fontColor(Color.Red)
}.onClick(() => {
Log.showInfo(TAG, `confirm button of TimeDialog on click`);
this.controller.close();
this.action();
})
.alignItems(HorizontalAlign.Center)
.width($r('app.float.confirm_dialog_button_width'))
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Column() {
Text($r('app.string.cancel'))
.fontSize($r('app.float.confirm_cont_fontsize'))
.fontColor($r("app.color.button_text_color"))
}.onClick(() => {
this.controller.close();
})
.alignItems(HorizontalAlign.Center)
.width($r('app.float.confirm_dialog_button_width'))
Divider()
.vertical(true)
.color($r('app.color.confirm_divider_color'))
.strokeWidth(1)
.height($r('app.float.confirm_divider_height'))
Column() {
Text($r('app.string.close'))
.fontSize($r('app.float.confirm_cont_fontsize'))
.fontColor($r("app.color.button_text_color"))
}.onClick(() => {
Log.showInfo(TAG, `confirm button of TimeDialog on click`)
this.controller.close();
this.action();
})
.alignItems(HorizontalAlign.Center)
.width($r('app.float.confirm_dialog_button_width'))
}
.width($r('app.float.confirm_dialog_width'))
.margin({ top: $r('app.float.confirm_button_margin_t') })
}
.width($r('app.float.confirm_dialog_width'))
.margin({ top: $r('app.float.confirm_button_margin_t') })
}.height($r('app.float.confirm_dialog_height'))
.width($r('app.float.confirm_dialog_width'))
.backgroundColor('#FFFFFFFF')
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.notification_border_radius') })
.height($r('app.float.confirm_dialog_height'))
.width(deviceTypeInfo === 'phone' ? '100%' : $r('app.float.confirm_dialog_width'))
.backgroundColor('#FFFFFF')
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.notification_border_radius') })
}
.margin({
left: $r("app.float.confirm_dialog_margin"),
right: $r("app.float.confirm_dialog_margin")
})
}
}
@@ -85,7 +85,7 @@ export default struct DevicesDialog {
Column() {
Text($r('app.string.cancel'))
.fontSize($r('app.float.device_button_font'))
.fontColor(Color.Blue)
.fontColor($r("app.color.button_text_color"))
}.onClick(() => {
this.controller.close();
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import Constants, {NotificationLayout as Layout} from '../../common/constants';
import Constants, { NotificationLayout as Layout } from '../../common/constants';
import basicItem from './basicItem';
import longItem from './longItem';
import multiItem from './multiItem';
@@ -138,6 +138,7 @@ struct ContentComponent {
.objectFit(ImageFit.Contain)
.width(Layout.NOTIFICATION_PIC_SIZE)
.height(Layout.NOTIFICATION_PIC_SIZE)
.borderRadius($r("app.float.notice_image_boderRadius"))
}
}.margin({ left: Layout.ITEM_MARGIN, right: Layout.ITEM_MARGIN })
}
@@ -14,10 +14,10 @@
*/
import Log from '../../../../../../../../../../common/src/main/ets/default/Log';
import Constants, {NotificationLayout as Layout} from '../../common/constants';
import Constants, { NotificationLayout as Layout } from '../../common/constants';
import NotificationItem from './notificationItem'
import titleItem from './titleItem';
import IconListComponent, {getIconListSize} from './iconListComponent';
import IconListComponent, { getIconListSize } from './iconListComponent';
import ScrollbarManager from '../../common/ScrollbarManager';
const TAG = 'NoticeItem-GroupItem';
@@ -62,6 +62,9 @@ export default struct GroupItem {
}.backgroundColor($r('app.color.notificationitem_background'))
.width(Constants.FULL_CONTAINER_WIDTH)
if (this.toExpand) {
Row().height($r("app.float.notice_divider")).width('100%')
}
Row() {
ContentList({ groupData: this.groupData, toExpand: this.toExpand })
}.width(Constants.FULL_CONTAINER_WIDTH)
@@ -13,12 +13,14 @@
* limitations under the License.
*/
import Constants, {NotificationLayout as Layout} from '../../common/constants';
import Constants, { NotificationLayout as Layout } from '../../common/constants';
import Log from '../../../../../../../../../../common/src/main/ets/default/Log';
import SettingDialog from './settingDialog';
import ConfirmDialog from './confirmDialog'
import ViewModel from '../../viewmodel/ViewModel';
import deviceInfo from '@ohos.deviceInfo';
const deviceTypeInfo = deviceInfo.deviceType;
const TAG = 'NoticeItem-IconListComponent';
let iconSize: number = 0;
@@ -47,8 +49,9 @@ export default struct IconListComponent {
action: () => this.confirmDialogController.open()
}),
autoCancel: false,
alignment: deviceTypeInfo === 'phone' ? DialogAlignment.Bottom : DialogAlignment.Default,
offset: { dx: 0, dy: $r('app.float.setting_dialog_dy') },
customStyle:true
customStyle: true
});
private confirmDialogController: CustomDialogController = new CustomDialogController({
builder: ConfirmDialog({
@@ -57,8 +60,9 @@ export default struct IconListComponent {
action: () => ViewModel.enableNotification(this.itemData, false)
}),
autoCancel: false,
alignment: deviceTypeInfo === 'phone' ? DialogAlignment.Bottom : DialogAlignment.Default,
offset: { dx: 0, dy: $r('app.float.confirm_dialog_dy') },
customStyle:true
customStyle: true
});
private iconConfigs: IconData[] = [
{
@@ -13,12 +13,15 @@
* limitations under the License.
*/
import Constants, {NotificationItemData} from '../../common/constants';
import Constants, { NotificationItemData } from '../../common/constants';
import Log from '../../../../../../../../../../common/src/main/ets/default/Log';
import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils';
import EventManager from "../../../../../../../../../../common/src/main/ets/default/event/EventManager"
import {obtainStartAbility} from "../../../../../../../../../../common/src/main/ets/default/event/EventUtil"
import { obtainStartAbility } from "../../../../../../../../../../common/src/main/ets/default/event/EventUtil"
import Notification from '@ohos.notification';
import deviceInfo from '@ohos.deviceInfo';
const deviceTypeInfo = deviceInfo.deviceType;
const TAG = 'NoticeItem-Setting';
@@ -32,79 +35,87 @@ export default struct SettingDialog {
public action: () => void
build() {
Column({ space: 4 }) {
Row({ space: 4 }) {
if (!CheckEmptyUtils.isEmpty(this.itemData.smallIcon)) {
Image(this.itemData.smallIcon)
.objectFit(ImageFit.Contain)
.width($r('app.float.title_image_width'))
.height($r('app.float.title_image_height'))
Column() {
Column({ space: 4 }) {
Row({ space: 4 }) {
if (!CheckEmptyUtils.isEmpty(this.itemData.smallIcon)) {
Image(this.itemData.smallIcon)
.objectFit(ImageFit.Contain)
.width($r('app.float.title_image_width'))
.height($r('app.float.title_image_height'))
}
Text(this.itemData.appName)
.fontSize($r('app.float.setting_title_fontsize'))
.fontWeight(500)
}.width($r('app.float.setting_dialog_row_width'))
.margin({ top: $r('app.float.notification_appname_margin_top') })
.height($r('app.float.title_font_height'))
Row() {
Column() {
Text($r('app.string.closeNotification'))
.fontSize($r('app.float.setting_cont_fontsize'))
.fontColor($r('app.color.dialog_font_color'))
.height($r('app.float.setting_dialog_row_height'))
}.alignItems(HorizontalAlign.Center)
.width(Constants.SETTING_CONTENT_WITH)
}
Text(this.itemData.appName)
.fontSize($r('app.float.setting_title_fontsize'))
.fontWeight(500)
}.width($r('app.float.setting_dialog_row_width'))
.margin({ top: $r('app.float.notification_appname_margin_top') })
.height($r('app.float.title_font_height'))
Row() {
Column() {
Text($r('app.string.closeNotification'))
.fontSize($r('app.float.setting_cont_fontsize'))
.fontColor($r('app.color.dialog_font_color'))
.height($r('app.float.setting_dialog_row_height'))
}.alignItems(HorizontalAlign.Center)
.width(Constants.SETTING_CONTENT_WITH)
}
.width($r('app.float.setting_dialog_row_width'))
.alignItems(VerticalAlign.Center)
.align(Alignment.Center)
.margin({ top: $r('app.float.close_notification_margin_top') })
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.setting_border_radius') })
.backgroundColor($r('app.color.dialog_font_back_color'))
.onClick(this.closeNotification.bind(this))
Row() {
Column() {
Text($r('app.string.moreSettings'))
.fontSize($r('app.float.setting_cont_fontsize'))
.fontColor($r('app.color.dialog_font_back_color'))
.height($r('app.float.setting_dialog_row_height'))
}.alignItems(HorizontalAlign.Center)
.width(Constants.SETTING_CONTENT_WITH)
.width($r('app.float.setting_dialog_row_width'))
.alignItems(VerticalAlign.Center)
.align(Alignment.Center)
}
.width($r('app.float.setting_dialog_row_width'))
.alignItems(VerticalAlign.Center)
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.setting_border_radius') })
.backgroundColor($r('app.color.action_button_click_color'))
.onClick(this.openAbility.bind(this))
.margin({ top: $r('app.float.close_notification_margin_top') })
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.setting_border_radius') })
.backgroundColor($r('app.color.dialog_font_back_color'))
.onClick(this.closeNotification.bind(this))
Row() {
Column() {
Text($r('app.string.cancel'))
.maxLines(Constants.DEFAULT_MAX_LINES)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.setting_cont_fontsize'))
.fontColor($r('app.color.dialog_font_back_color'))
}.alignItems(HorizontalAlign.Center)
.width(Constants.SETTING_CONTENT_WITH)
Row() {
Column() {
Text($r('app.string.moreSettings'))
.fontSize($r('app.float.setting_cont_fontsize'))
.fontColor($r('app.color.button_text_color'))
.height($r('app.float.setting_dialog_row_height'))
}.alignItems(HorizontalAlign.Center)
.width(Constants.SETTING_CONTENT_WITH)
.align(Alignment.Center)
}
.width($r('app.float.setting_dialog_row_width'))
.alignItems(VerticalAlign.Center)
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.setting_border_radius') })
.backgroundColor($r('app.color.action_button_click_color'))
.onClick(this.openAbility.bind(this))
Row() {
Column() {
Text($r('app.string.cancel'))
.maxLines(Constants.DEFAULT_MAX_LINES)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.setting_cont_fontsize'))
.fontColor($r('app.color.button_text_color'))
}.alignItems(HorizontalAlign.Center)
.width(Constants.SETTING_CONTENT_WITH)
}
.width($r('app.float.setting_dialog_row_width'))
.margin({ top: $r('app.float.notification_cancle_margin_top') })
.alignItems(VerticalAlign.Center)
.align(Alignment.Center)
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.setting_border_radius') })
.backgroundColor($r('app.color.dialog_font_color'))
.onClick(this.closeAbility.bind(this))
}
.width($r('app.float.setting_dialog_row_width'))
.margin({ top: $r('app.float.notification_cancle_margin_top') })
.alignItems(VerticalAlign.Center)
.align(Alignment.Center)
.height($r('app.float.setting_dialog_height'))
.width(deviceTypeInfo === 'phone' ? '100%' : $r('app.float.setting_dialog_width'))
.backgroundColor('#FFFFFF')
.margin({ left: 20, right: 20 })
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.setting_border_radius') })
.backgroundColor($r('app.color.dialog_font_color'))
.onClick(this.closeAbility.bind(this))
}.height($r('app.float.setting_dialog_height'))
.width($r('app.float.setting_dialog_width'))
.backgroundColor('#FFFFFFFF')
.border({ width: $r('app.float.setting_border_width'), color: Color.White,
radius: $r('app.float.notification_border_radius') })
radius: $r('app.float.notification_border_radius') })
}
.margin({
left: $r("app.float.confirm_dialog_margin"),
right: $r("app.float.confirm_dialog_margin")
})
}
closeNotification() {
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import Constants, {NotificationLayout as Layout} from '../../common/constants';
import Constants, { NotificationLayout as Layout } from '../../common/constants';
import Log from '../../../../../../../../../../common/src/main/ets/default/Log';
import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils';
@@ -2,7 +2,7 @@
"color": [
{
"name":"notificationitem_background",
"value":"#ffffffff"
"value":"#8CFAFAFA"
},
{
"name":"title_text_color",
@@ -50,7 +50,11 @@
},
{
"name": "device_divider_color",
"value": "#E3E3E3"
"value": "transparent"
},
{
"name": "button_text_color",
"value": "#007DFF"
}
]
}
@@ -164,6 +164,10 @@
"name": "confirm_button_height",
"value": "60"
},
{
"name": "confirm_dialog_margin",
"value": "0"
},
{
"name": "confirm_button_margin_t",
"value": "50vp"
@@ -215,6 +219,14 @@
{
"name": "device_margin_16",
"value": "16fp"
},
{
"name": "notice_image_boderRadius",
"value": "0"
},
{
"name": "notice_divider",
"value": "1vp"
}
]
}
@@ -0,0 +1,12 @@
{
"color": [
{
"name": "button_text_color",
"value": "#007DFF"
},
{
"name":"dialog_font_back_color",
"value":"#007DFF"
}
]
}
@@ -0,0 +1,124 @@
{
"float": [
{
"name": "title_image_width",
"value": "24vp"
},
{
"name": "title_image_height",
"value": "24vp"
},
{
"name": "title_font_height",
"value": "28vp"
},
{
"name": "title_font_margin_t",
"value": "11vp"
},
{
"name": "message_font_margin_t",
"value": "17.65vp"
},
{
"name": "setting_title_fontsize",
"value": "20vp"
},
{
"name": "setting_cont_fontsize",
"value": "16vp"
},
{
"name": "setting_border_width",
"value": "0.5vp"
},
{
"name": "setting_border_radius",
"value": "24vp"
},
{
"name": "setting_dialog_height",
"value": "192vp"
},
{
"name": "setting_dialog_width",
"value": "336vp"
},
{
"name": "setting_dialog_row_width",
"value": "304vp"
},
{
"name": "setting_dialog_row_height",
"value": "40vp"
},
{
"name": "confirm_dialog_height",
"value": "142vp"
},
{
"name": "confirm_dialog_width",
"value": "336vp"
},
{
"name": "confirm_dialog_margin",
"value": "12vp"
},
{
"name": "confirm_dialog_row_width",
"value": "288vp"
},
{
"name": "confirm_dialog_button_width",
"value": "127.59vp"
},
{
"name": "confirm_title_fontsize",
"value": "20vp"
},
{
"name": "confirm_cont_fontsize",
"value": "16vp"
},
{
"name": "confirm_divider_height",
"value": "22vp"
},
{
"name": "confirm_button_height",
"value": "30vp"
},
{
"name": "confirm_button_margin_t",
"value": "25vp"
},
{
"name": "setting_dialog_dy",
"value": "-12vp"
},
{
"name": "confirm_dialog_dy",
"value": "-12vp"
},
{
"name": "notification_appname_margin_top",
"value": "11vp"
},
{
"name": "close_notification_margin_top",
"value": "17vp"
},
{
"name": "notification_cancle_margin_top",
"value": "13.28vp"
},
{
"name": "notice_image_boderRadius",
"value": "12vp"
},
{
"name": "notice_divider",
"value": "1vp"
}
]
}
@@ -28,7 +28,7 @@ const TAG = 'NotificationManagement-BatchSetEnable';
export default struct BatchSetEnable {
@State mViewModel: ViewModel = new ViewModel();
@StorageLink('appManagementList') appList: any[]= [];
@State headName:Resource = $r('app.string.notificationManagement')
@State headName:Resource = $r('app.string.batch_Management')
build() {
Column() {
@@ -58,7 +58,7 @@ export default struct BatchSetEnable {
}
.divider({
strokeWidth: 1,
color: $r('app.color.background_color'),
color: $r('app.color.divider_color'),
startMargin: $r('app.float.divider_margin_l_info'),
endMargin: $r('app.float.divider_margin_r')
})
@@ -28,7 +28,7 @@ const TAG = 'NotificationManagement-NoDisturbPre';
@Component
export default struct notificationManagenment {
@State columnMargin: string = '24vp';
@State headName: Resource = $r('app.string.notificationManagement')
@State headName: Resource = $r('app.string.noDisturb')
@State refreshRequest: number= 0
build() {
@@ -45,8 +45,12 @@ export default struct notificationManagenment {
Row() {
Text($r('app.string.timing_on'))
.fontSize($r('app.float.page_phrases_font'))
.margin({top:$r('app.float.page_phrases_padding_t')})
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontWeight(FontWeight.Medium)
.fontFamily('HarmonyHeiTi-Medium')
.margin({ top: $r('app.float.page_phrases_padding_t') })
}
.align(Alignment.Start)
.width(ConfigData.WH_100_100)
.height($r('app.float.page_phrases_height'))
.padding({ left: $r('sys.float.ohos_id_default_padding_start') })
@@ -58,7 +62,8 @@ export default struct notificationManagenment {
.onClick(() => {
Log.showInfo(TAG, `NoDisturbComponent on click`)
Router.push({ uri: 'pages/noDisturb' });
}).width(ConfigData.WH_100_100)
})
.width(ConfigData.WH_100_100)
.backgroundColor(Color.White)
.border({ width: $r('app.float.border_width'), color: Color.White,
radius: $r('app.float.border_radius') })
@@ -75,11 +75,15 @@ export default struct notificationManagenment {
.fontSize($r('sys.float.ohos_id_text_size_body1'))
.fontColor($r('app.color.itemComp_title_color'))
.align(Alignment.End)
.margin({ right: $r("app.float.noDisturb_text_margin_right") })
.fontWeight(FontWeight.Medium)
} else {
Text($r('app.string.noDisturb_closed'))
.fontSize($r('sys.float.ohos_id_text_size_body1'))
.fontColor($r('app.color.itemComp_title_color'))
.align(Alignment.End)
.margin({ right: $r("app.float.noDisturb_text_margin_right") })
.fontWeight(FontWeight.Medium)
}
Image($r('app.media.ic_settings_arrow'))
.align(Alignment.End)
@@ -103,11 +107,18 @@ export default struct notificationManagenment {
.onClick(() => {
Log.showInfo(TAG, `NoDisturbComponent on click`)
Router.push({ uri: 'pages/noDisturbPre' });
}).width(ConfigData.WH_100_100)
})
.width(ConfigData.WH_100_100)
.flexShrink(0)
Column() {
Divider().color($r('app.color.divider_color')).strokeWidth(1)
}.padding({ left: $r('sys.float.ohos_id_default_padding_start'),right:$r('sys.float.ohos_id_default_padding_end') })
}
.padding({
left: $r('sys.float.ohos_id_default_padding_start'),
right: $r('sys.float.ohos_id_default_padding_end')
})
Row() {
Row() {
SwitchComponent({
@@ -123,19 +134,19 @@ export default struct notificationManagenment {
.backgroundColor(Color.White)
.border({ width: $r('app.float.border_width'), color: Color.White,
radius: $r('app.float.border_radius') })
.margin({top:$r('app.float.page_notice_title_margin_t')});
.margin({ top: $r('app.float.page_notice_title_margin_t') });
Row() {
Text($r('app.string.notificationManagement'))
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
.fontSize($r('sys.float.ohos_id_text_size_body2'))
.fontWeight(FontWeight.Bold)
.fontWeight(FontWeight.Medium)
.fontFamily('HarmonyHeiTi-Medium')
.margin({top:$r('app.float.page_phrases_padding_t')})
.margin({ top: $r('app.float.page_phrases_padding_t') })
}.align(Alignment.Start)
.width(ConfigData.WH_100_100)
.height($r('app.float.page_phrases_height'))
.padding({ left: $r('sys.float.ohos_id_default_padding_start')})
.padding({ left: $r('sys.float.ohos_id_default_padding_start') })
Row() {
ItemComponent({ title: $title, value: '', arrow: $arrow })
@@ -148,8 +159,8 @@ export default struct notificationManagenment {
Column() {
AppLstComponent()
}.width(ConfigData.WH_100_100)
.height(this.mViewModel.isPhone?$r('app.float.applist_hieght_phone'):$r('app.float.applist_hieght'))
.margin({top:$r('app.float.applist_margin_t')});
.height(this.mViewModel.isPhone ? $r('app.float.applist_hieght_phone') : $r('app.float.applist_hieght'))
.margin({ top: $r('app.float.applist_margin_t') });
}
.width(ConfigData.WH_100_100)
@@ -14,8 +14,8 @@
*/
import Log from '../../../../../../../common/src/main/ets/default/log'
import EventManager, {unsubscribe} from "../../../../../../../common/src/main/ets/default/event/eventmanager"
import {obtainStartAbility} from "../../../../../../../common/src/main/ets/default/event/eventutil"
import EventManager, { unsubscribe } from "../../../../../../../common/src/main/ets/default/event/eventmanager"
import { obtainStartAbility } from "../../../../../../../common/src/main/ets/default/event/eventutil"
import Constants from './common/constants'
import BatteryIcon from '../../../../../../../features/batterycomponent/src/main/ets/default/pages/batteryicon'
import ClockIcon from '../../../../../../../features/clockcomponent/src/main/ets/default/pages/clockicon'
@@ -27,16 +27,19 @@ import RingModeIcon from '../../../../../../../features/ringmodecomponent/src/ma
import NotificationListComponent from '../../../../../../../features/noticeitem/src/main/ets/com/ohos/noticeitem/view/notificationlistcomponent'
import ViewModel from '../../../../../../../features/noticeitem/src/main/ets/com/ohos/noticeitem/viewmodel/viewmodel'
import ResourceUtil from '../../../../../../../common/src/main/ets/default/resourceutil'
import TimeManager, { TimeEventArgs, TIME_CHANGE_EVENT } from '../../../../../../../common/src/main/ets/default/timemanager'
import TimeManager, { TimeEventArgs, TIME_CHANGE_EVENT
} from '../../../../../../../common/src/main/ets/default/timemanager'
const TAG = 'DropdownPanel-notification'
const GRID_SIZE = 6;
const IMAGE_SIZE_L = 40;
const IMAGE_SIZE_S = 48;
const IMAGE_SIZE_L = 24;
const IMAGE_SIZE_S = 20;
const BGC_SIZE_L = 40;
const NO_NOTIFICATION_TOP_MARGIN = 40;
const TIME_TEXT_MARGIN = 8;
const TIME_TEXT_MARGIN = 4;
const CENTER_TITLE_MARGIN_TOP = 12;
const TIME_BOTTOM_OFFSET = 7;
const SETTING_ICON_MARGIN = 12;
const CENTER_MARGIN = 12;
@Component
export default struct Notification {
@@ -84,13 +87,20 @@ export default struct Notification {
}
if (this.notificationList.length > 0) {
Image($r('app.media.delete_all'))
.width(IMAGE_SIZE_L)
.height(IMAGE_SIZE_L)
.margin({ bottom: 32 })
.onClick(() => {
ViewModel.removeAllNotifications();
})
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Image($r('app.media.ic_public_delete_filled'))
.fillColor("#FFFFFF")
.width(IMAGE_SIZE_L)
.height(IMAGE_SIZE_L)
}
.width(BGC_SIZE_L)
.height(BGC_SIZE_L)
.margin({ bottom: $r('app.float.notification_delete_all') })
.borderRadius(BGC_SIZE_L)
.backgroundColor($r('app.color.notification_delete_all_background'))
.onClick(() => {
ViewModel.removeAllNotifications();
})
}
}.onTouch(this.touchEvent.bind(this))
}
@@ -177,21 +187,22 @@ struct CenterTitle {
.fontColor($r("sys.color.ohos_id_color_text_primary_contrary"))
.fontSize('36fp')
.fontWeight(FontWeight.Medium)
.margin({ left: TIME_TEXT_MARGIN })
.margin({ left: CENTER_MARGIN })
Text(this.mTimeString)
.fontColor($r("sys.color.ohos_id_color_text_primary_contrary"))
.fontSize($r("sys.float.ohos_id_text_size_sub_title3"))
.fontWeight(FontWeight.Medium)
.margin({ left: TIME_TEXT_MARGIN, bottom: TIME_BOTTOM_OFFSET })
.flexGrow(1)
Image($r('app.media.ic_settings'))
Image($r("app.media.ic_public_settings"))
.objectFit(ImageFit.Contain)
.width(IMAGE_SIZE_S)
.height(IMAGE_SIZE_S)
.margin({ right: SETTING_ICON_MARGIN, bottom: TIME_BOTTOM_OFFSET })
.fillColor("#FFFFFF")
.margin({ right: CENTER_MARGIN, bottom: TIME_BOTTOM_OFFSET })
.onClick(this.settingClick.bind(this))
}
.margin({ top: TIME_TEXT_MARGIN, bottom: TIME_TEXT_MARGIN })
.margin({ top: CENTER_TITLE_MARGIN_TOP, bottom: TIME_TEXT_MARGIN })
.onTouch(this.touchEvent.bind(this))
}
@@ -4,6 +4,10 @@
"name": "default_background",
"value": "#4D999999"
},
{
"name": "notification_delete_all_background",
"value": "#4C000000"
},
{
"name": "default_font_color",
"value": "#ffffffff"
@@ -4,6 +4,10 @@
"name": "status_bar_height",
"value": "48vp"
},
{
"name": "notification_delete_all",
"value": "32"
},
{
"name": "quickly_setting_time_font_size",
"value": "30fp"
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Public/ic_public_delete</title>
<defs>
<path d="M5.629,7.5 L6.72612901,18.4738834 C6.83893748,19.6019681 7.77211147,20.4662096 8.89848718,20.4990325 L8.96496269,20.5 L15.0342282,20.5 C16.1681898,20.5 17.1211231,19.6570911 17.2655686,18.5392856 L17.2731282,18.4732196 L18.1924161,9.2527383 L18.369,7.5 L19.877,7.5 L19.6849078,9.40262938 L18.7657282,18.6220326 C18.5772847,20.512127 17.0070268,21.9581787 15.1166184,21.9991088 L15.0342282,22 L8.96496269,22 C7.06591715,22 5.47142703,20.5815579 5.24265599,18.7050136 L5.23357322,18.6231389 L4.121,7.5 L5.629,7.5 Z M10.25,11.75 C10.6642136,11.75 11,12.0857864 11,12.5 L11,18.5 C11,18.9142136 10.6642136,19.25 10.25,19.25 C9.83578644,19.25 9.5,18.9142136 9.5,18.5 L9.5,12.5 C9.5,12.0857864 9.83578644,11.75 10.25,11.75 Z M13.75,11.75 C14.1642136,11.75 14.5,12.0857864 14.5,12.5 L14.5,18.5 C14.5,18.9142136 14.1642136,19.25 13.75,19.25 C13.3357864,19.25 13,18.9142136 13,18.5 L13,12.5 C13,12.0857864 13.3357864,11.75 13.75,11.75 Z M12,1.75 C13.7692836,1.75 15.2083571,3.16379796 15.2491124,4.92328595 L15.25,5 L21,5 C21.4142136,5 21.75,5.33578644 21.75,5.75 C21.75,6.14942022 21.43777,6.47591522 21.0440682,6.49872683 L21,6.5 L14.5,6.5 C14.1005798,6.5 13.7740848,6.18777001 13.7512732,5.7940682 L13.75,5.75 L13.75,5 C13.75,4.03350169 12.9664983,3.25 12,3.25 C11.0536371,3.25 10.2827253,4.00119585 10.2510148,4.93983756 L10.25,5 L10.25,5.75 C10.25,6.14942022 9.93777001,6.47591522 9.5440682,6.49872683 L9.5,6.5 L2.75,6.5 C2.33578644,6.5 2,6.16421356 2,5.75 C2,5.35057978 2.31222999,5.02408478 2.7059318,5.00127317 L2.75,5 L8.75,5 C8.75,3.20507456 10.2050746,1.75 12,1.75 Z" id="path-1"></path>
</defs>
<g id="Public/ic_public_delete" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<use id="形状结合" fill="#000000" fill-rule="nonzero" xlink:href="#path-1"></use>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Public/ic_public_delete_filled</title>
<defs>
<path d="M19.905,7 L18.7182288,19.0681369 C18.5545878,20.7318206 17.1555495,22 15.4838372,22 L15.4838372,22 L8.51616277,22 C6.84445049,22 5.44541221,20.7318206 5.28177119,19.0681369 L5.28177119,19.0681369 L4.094,7 L19.905,7 Z M10,11.75 C9.58578644,11.75 9.25,12.0857864 9.25,12.5 L9.25,12.5 L9.25,18.5 C9.25,18.9142136 9.58578644,19.25 10,19.25 C10.4142136,19.25 10.75,18.9142136 10.75,18.5 L10.75,18.5 L10.75,12.5 C10.75,12.0857864 10.4142136,11.75 10,11.75 Z M14,11.75 C13.5857864,11.75 13.25,12.0857864 13.25,12.5 L13.25,12.5 L13.25,18.5 C13.25,18.9142136 13.5857864,19.25 14,19.25 C14.4142136,19.25 14.75,18.9142136 14.75,18.5 L14.75,18.5 L14.75,12.5 C14.75,12.0857864 14.4142136,11.75 14,11.75 Z M12,1.75 C13.5727118,1.75 14.862769,2.9601879 14.9897427,4.50013463 L21.25,4.5 C21.6642136,4.5 22,4.83578644 22,5.25 C22,5.64942022 21.68777,5.97591522 21.2940682,5.99872683 L21.25,6 L2.75,6 C2.33578644,6 2,5.66421356 2,5.25 C2,4.85057978 2.31222999,4.52408478 2.7059318,4.50127317 L2.75,4.5 L9.01025734,4.50013463 C9.13723098,2.9601879 10.4272882,1.75 12,1.75 Z" id="path-1"></path>
</defs>
<g id="Public/ic_public_delete_filled" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<use id="形状结合" fill="#000000" fill-rule="nonzero" xlink:href="#path-1"></use>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Public/ic_public_settings</title>
<defs>
<path d="M13.4894964,1.25 C14.1901033,1.25 14.8231865,1.66785112 15.0986042,2.31205231 L15.0986042,2.31205231 L15.92125,4.23625 L16.77175,4.72725 L18.8556101,4.47607817 C19.5285537,4.39491431 20.1856012,4.70961774 20.5451004,5.27951678 L20.5451004,5.27951678 L20.5800481,5.33735213 L22.0680131,7.91013134 C22.4194652,8.51781272 22.3737758,9.27669833 21.9519545,9.83782407 L21.9519545,9.83782407 L20.69375,11.51125 L20.69375,12.4885 L21.9519801,14.16219 C22.3597241,14.70461 22.4160026,15.4318142 22.1018413,16.0285992 L22.1018413,16.0285992 L22.0680196,16.0898574 L20.5800481,18.6626479 C20.2293867,19.2689622 19.5509852,19.6077912 18.8556101,19.5239218 L18.8556101,19.5239218 L16.77175,19.2725 L15.92125,19.7635 L15.0986042,21.6879477 C14.832071,22.3113682 14.2305752,22.7228063 13.5570765,22.748702 L13.5570765,22.748702 L13.4894964,22.75 L10.5105451,22.75 C9.80990141,22.75 9.17679241,22.3321056 8.90139751,21.6878548 L8.90139751,21.6878548 L8.0785,19.7635 L7.228,19.2725 L5.14438986,19.5239218 C4.47144629,19.6050857 3.81439883,19.2903823 3.45489956,18.7204832 L3.45489956,18.7204832 L3.41995189,18.6626479 L1.9319804,16.0898574 C1.58053408,15.482186 1.62621577,14.7233142 2.04801988,14.16219 L2.04801988,14.16219 L3.306,12.4885 L3.306,11.51125 L2.04804545,9.83782407 C1.64028496,9.29540252 1.58399872,8.56818536 1.89816473,7.97139057 L1.89816473,7.97139057 L1.93198692,7.91013134 L3.41995189,5.33735213 C3.77061333,4.73103782 4.44901483,4.39220884 5.14438986,4.47607817 L5.14438986,4.47607817 L7.228,4.72725 L8.0785,4.23625 L8.90139751,2.31214525 C9.1679087,1.68867667 9.7694279,1.27719647 10.4429614,1.25129813 L10.4429614,1.25129813 L10.5105451,1.25 Z M13.4894964,2.75 L10.5105451,2.75 C10.4104531,2.75 10.320009,2.8096992 10.2806668,2.90173504 L10.2806668,2.90173504 L9.42547944,4.90233575 C9.31921851,5.1509195 9.13523096,5.35835416 8.90110986,5.49353025 L8.90110986,5.49353025 L7.90597116,6.06810022 C7.67169142,6.20336791 7.39985123,6.25898058 7.13127161,6.22658714 L7.13127161,6.22658714 L4.96477622,5.96528566 C4.86543693,5.95330433 4.76852243,6.00170847 4.71842794,6.0883248 L4.71842794,6.0883248 L3.23046296,8.66110401 C3.18025552,8.74791564 3.18678258,8.85632787 3.24704275,8.93648869 L3.24704275,8.93648869 L4.55532037,10.6768191 C4.71812619,10.8933908 4.80615731,11.1569971 4.80615595,11.4279382 L4.80615595,11.4279382 L4.80615019,12.5719965 C4.80614882,12.8429255 4.71812287,13.1065199 4.55532821,13.3230849 L4.55532821,13.3230849 L3.24703351,15.0635037 C3.18677578,15.1436643 3.18024983,15.2520745 3.23045644,15.3388847 L3.23045644,15.3388847 L4.71842794,17.9116752 C4.76852243,17.9982915 4.86543693,18.0466957 4.96477622,18.0347143 L4.96477622,18.0347143 L7.13127161,17.7734129 C7.39985123,17.7410194 7.67169142,17.7966321 7.90597116,17.9318998 L7.90597116,17.9318998 L8.90110986,18.5064697 C9.13523096,18.6416458 9.31921851,18.8490805 9.42547944,19.0976643 L9.42547944,19.0976643 L10.2806668,21.098265 C10.320009,21.1903008 10.4104531,21.25 10.5105451,21.25 L10.5105451,21.25 L13.4894964,21.25 C13.5895831,21.25 13.6800236,21.190307 13.7193689,21.0982782 L13.7193689,21.0982782 L14.5747715,19.097494 C14.6810343,18.8489455 14.8650036,18.6415401 15.0990951,18.506376 L15.0990951,18.506376 L16.0940158,17.9319104 C16.3282993,17.7966355 16.6001464,17.7410191 16.8687329,17.7734134 L16.8687329,17.7734134 L19.0352238,18.0347143 C19.1345631,18.0466957 19.2314776,17.9982915 19.2815721,17.9116752 L19.2815721,17.9116752 L20.7695436,15.3388847 C20.8197502,15.2520745 20.8132242,15.1436643 20.7529665,15.0635037 L20.7529665,15.0635037 L19.4446718,13.3230849 C19.2818771,13.1065199 19.1938512,12.8429255 19.1938498,12.5719965 L19.1938498,12.5719965 L19.1938441,11.4279382 C19.1938427,11.1569971 19.2818738,10.8933908 19.4446796,10.6768191 L19.4446796,10.6768191 L20.7529572,8.93648869 C20.8132174,8.85632787 20.8197445,8.74791564 20.769537,8.66110401 L20.769537,8.66110401 L19.2815721,6.0883248 C19.2314776,6.00170847 19.1345631,5.95330433 19.0352238,5.96528566 L19.0352238,5.96528566 L16.8687329,6.2265866 C16.6001464,6.25898087 16.3282993,6.2033645 16.0940158,6.06808955 L16.0940158,6.06808955 L15.0990951,5.49362397 C14.8650036,5.3584599 14.6810343,5.15105452 14.5747715,4.90250599 L14.5747715,4.90250599 L13.7193689,2.90172176 C13.6800236,2.80969302 13.5895831,2.75 13.4894964,2.75 L13.4894964,2.75 Z M12,7.5 C14.4852814,7.5 16.5,9.51471863 16.5,12 C16.5,14.4852814 14.4852814,16.5 12,16.5 C9.51471863,16.5 7.5,14.4852814 7.5,12 C7.5,9.51471863 9.51471863,7.5 12,7.5 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z" id="path-1"></path>
</defs>
<g id="Public/ic_public_settings" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<use id="形状结合" fill="#000000" fill-rule="nonzero" xlink:href="#path-1"></use>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

@@ -3,6 +3,10 @@
{
"name": "default_background",
"value": "#999999"
},
{
"name": "notification_delete_all_background",
"value": "#4C000000"
}
]
}
@@ -0,0 +1,8 @@
{
"float": [
{
"name": "notification_delete_all",
"value": "64vp"
}
]
}