From: xue <2144439972@qq.com> Date: Tue, 28 Oct 2025 03:17:48 +0000 (+0800) Subject: 解决屏保不切换的问题,解决头发锯齿问题 X-Git-Tag: V1.0.9_20251128_194606_LN~162 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=b794d054762682c401591bef61057be23d394123;p=mirrors%2FFD230.git 解决屏保不切换的问题,解决头发锯齿问题 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp index 132fe03cd..11990e901 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp @@ -6,6 +6,7 @@ */ #include "common/image_cache_manager.h" +#include "imgdecode/cache_manager.h" #include "ui_resource_image.h" #include #include "components/ui_button.h" @@ -737,7 +738,7 @@ namespace OHOS GRAPHIC_LOGE("surfaceView is nullptr\n"); return; } - colorKey_.full = 0xff202020; + colorKey_.full = 0xffecdbd4; surfaceView_->SetViewId("sur"); surfaceView_->SetPosition(0, 0, VIDEO_WIDTH, VIDEO_HEIGHT); surfaceView_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); @@ -820,6 +821,11 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdMainView::SwitchIconImage: Switching to image: %s", imagePath); + + // 清除图片缓存,确保重新加载 + CacheManager::GetInstance().Close(imagePath); + + // 设置新的图片源 iconView->SetSrc(imagePath); iconView->Invalidate(); }