From b37aaeffc13106dfb276d9c4d5906d166fb17365 Mon Sep 17 00:00:00 2001 From: tangzhigang1 Date: Thu, 23 Feb 2023 17:06:15 +0800 Subject: [PATCH] =?UTF-8?q?fixed=2092ecbb0=20from=20https://gitee.com/seas?= =?UTF-8?q?on-sysu/applications=5Fsystemui/pulls/313=20=E5=85=8D=E6=89=93?= =?UTF-8?q?=E6=89=B0back=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SEASON_SYSU --- common/src/main/ets/default/WindowManager.ts | 4 ++-- .../main/ets/com/ohos/view/component/noDisturbComponent.ets | 4 ++-- .../navigationBar/src/main/ets/common/IndicatorConfig.ts | 6 +++--- .../src/main/ets/pages/PrivacyIndicatorComponent.ets | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/src/main/ets/default/WindowManager.ts b/common/src/main/ets/default/WindowManager.ts index e6229608..0dfc71fb 100644 --- a/common/src/main/ets/default/WindowManager.ts +++ b/common/src/main/ets/default/WindowManager.ts @@ -146,8 +146,8 @@ class WindowManager { } async setWindowBgColor(name: WindowType, bgColor: string): void { - let window = await Window.find(name) - window.setWindowBackgroundColor(bgColor); + let window = await Window.find(name) + window.setWindowBackgroundColor(bgColor); } diff --git a/features/managementcomponent/src/main/ets/com/ohos/view/component/noDisturbComponent.ets b/features/managementcomponent/src/main/ets/com/ohos/view/component/noDisturbComponent.ets index 992315d1..279dc1d0 100644 --- a/features/managementcomponent/src/main/ets/com/ohos/view/component/noDisturbComponent.ets +++ b/features/managementcomponent/src/main/ets/com/ohos/view/component/noDisturbComponent.ets @@ -21,7 +21,7 @@ const TAG = 'ManagementComponent-NoDisturbComponent'; @Component export default struct NoDisturbComponent { @State mViewModel: ViewModel = new ViewModel() - @State @Watch('onRefresh') refreshRequest: number= 0 + @Prop @Watch('onRefresh') refreshRequest: number mPrevReapMode: number = 0; mPrevStartTime: Date= new Date() mPrevEndTime: Date= new Date() @@ -36,7 +36,7 @@ export default struct NoDisturbComponent { this.mRefreshCnt++; } - onRefresh(propName: string): void { + onRefresh(): void { Log.showInfo(TAG, `onRefresh`); this.mViewModel.viewModelInit(); this.mPrevGetCnt = 0; diff --git a/product/default/navigationBar/src/main/ets/common/IndicatorConfig.ts b/product/default/navigationBar/src/main/ets/common/IndicatorConfig.ts index 580757f1..aaa4c738 100644 --- a/product/default/navigationBar/src/main/ets/common/IndicatorConfig.ts +++ b/product/default/navigationBar/src/main/ets/common/IndicatorConfig.ts @@ -11,17 +11,17 @@ export default class IndicatorStyle { /** * 圆点圆角半径 */ - static readonly indicatorBorderRadius = '11px'; + static readonly indicatorBorderRadius = '3vp'; /** * 圆点距离顶部尺寸 */ - static readonly indicatorTopMargin = '10px'; + static readonly indicatorTopMargin = '3.5vp'; /** * 圆点距离右侧尺寸 */ - static readonly indicatorRightMargin = '150px'; + static readonly indicatorRightMargin = '37.5vp'; } /** diff --git a/product/default/navigationBar/src/main/ets/pages/PrivacyIndicatorComponent.ets b/product/default/navigationBar/src/main/ets/pages/PrivacyIndicatorComponent.ets index c16d71e4..12be103a 100644 --- a/product/default/navigationBar/src/main/ets/pages/PrivacyIndicatorComponent.ets +++ b/product/default/navigationBar/src/main/ets/pages/PrivacyIndicatorComponent.ets @@ -26,11 +26,11 @@ export default struct PrivacyIndicatorComponent { this.mViewModel = new ViewModel(); this.mViewModel.setCallback((type) => { if (type == IndicatorType.TYPE_ORANGE) { - this.mBackgroundColor = $r("app.color.indicator_color_orange"); + this.mBackgroundColor = $r("sys.color.ohos_id_color_alert"); } else if (type == IndicatorType.TYPE_GREEN) { - this.mBackgroundColor = $r("app.color.indicator_color_green"); + this.mBackgroundColor = $r("sys.color.ohos_id_color_connected"); } else if (type == IndicatorType.TYPE_BLUE) { - this.mBackgroundColor = $r("app.color.indicator_color_blue"); + this.mBackgroundColor = $r("sys.color.ohos_id_color_activated"); } else { // 不显示 this.mBackgroundColor = $r("app.color.transparent");