From: luozheng <1732036298@qq.com> Date: Fri, 13 Sep 2024 11:05:23 +0000 (+0800) Subject: #662,解决手表,手电筒设置,5个灯光颜色都选择一遍,灯光颜色不会改变bug X-Git-Tag: release_V1.2.70_20241020_135402~485^2^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=af88e428603c5e3e3ae95a5556bbd1ec1805d22e;p=mirrors%2FFD230.git #662,解决手表,手电筒设置,5个灯光颜色都选择一遍,灯光颜色不会改变bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/alarm/src/MainAlarmView.cpp b/code/sdk/application/wearable/fd230app/nativeui/alarm/src/MainAlarmView.cpp index 6f58e6a43..03e6f92a8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarm/src/MainAlarmView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarm/src/MainAlarmView.cpp @@ -433,7 +433,7 @@ void MainAlarmView::LabelGetWeek(uint8_t week, int16_t alarmNum) dLabel[alarmNum]->SetText(weekStr.c_str()); else dLabel[alarmNum]->SetText(weekStr_en.c_str()); - dLabel[alarmNum]->ForceResetText(); + // dLabel[alarmNum]->ForceResetText(); } bool MainAlarmView::GetRefreshStatus(void) diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h index 00e53d148..a4aa0ff42 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-10 17:32:02 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-04-10 21:17:05 + * @LastEditTime: 2024-09-13 18:55:12 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/include/FlashlightView.h */ @@ -45,6 +45,7 @@ namespace OHOS void GetValueByColorCustomSelectedImage(int16_t x, int16_t y, int64_t * value); void GetPointByColorCustomSelectedImage(int16_t * x, int16_t * y, int64_t value); void UpdateViewMainScreenFlashing(bool flag); + void UpdateViewMainScreenColor(); typedef enum { diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp index 36b6f2471..6468286ab 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp @@ -152,7 +152,7 @@ namespace OHOS { if (g_timer != NULL) { - osTimerStop(g_timer); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FlashlightModel::FlashlightStopTimer"); osStatus_t ret = osOK; ret = osTimerStop(g_timer); if (ret != osOK) diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp index 885f26fc7..49ca0a24b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-10 17:32:08 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-28 20:47:00 + * @LastEditTime: 2024-09-13 18:59:42 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/src/FlashlightView.cpp */ #include "flashlight/include/FlashlightView.h" @@ -212,6 +212,14 @@ namespace OHOS Draw(); } + void FlashlightView::UpdateViewMainScreenColor() + { + if(GroupMain_) + { + GroupMain_->SetStyle(STYLE_BACKGROUND_COLOR, presenter_->GetColorValue()); + } + } + void FlashlightView::UpdateViewMainScreen(void) { if(nullptr == SwipeView_) @@ -219,6 +227,7 @@ namespace OHOS SwipeView_->SetCurrentPage(0); + UpdateViewMainScreenColor(); if(0 == presenter_->GetFlashingLevel()) UpdateViewMainScreenFlashing(false); else