From: xue <2144439972@qq.com> Date: Wed, 18 Jun 2025 04:02:38 +0000 (+0800) Subject: 修改背景图片,删除重复图片 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=e2a71fed5acb1298638b0c09e461446cc32444b2;p=mirrors%2FFD230.git 修改背景图片,删除重复图片 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPResultAnalysisView.h b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPResultAnalysisView.h index 76eb50d3d..991b78776 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPResultAnalysisView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPResultAnalysisView.h @@ -24,6 +24,7 @@ namespace OHOS private: UIImageView *background = nullptr; + UIImageView *lineground = nullptr; UILabelExt *calibrationLabel = nullptr; UILabelExt *mindLabel = nullptr; UIViewGroup *group{nullptr}; diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPSecUnderCalibrationView.h b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPSecUnderCalibrationView.h index 16d39280b..cda4a3164 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPSecUnderCalibrationView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPSecUnderCalibrationView.h @@ -28,6 +28,7 @@ namespace OHOS private: UIImageView *background = nullptr; + UIImageView *lineground = nullptr; UILabelExt *calibrationLabel = nullptr; UILabelExt *remindLabel = nullptr; UILabelExt *timeLabel = nullptr; diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPUnderCalibrationView.h b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPUnderCalibrationView.h index c6ada0881..35c9a2c25 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPUnderCalibrationView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPUnderCalibrationView.h @@ -18,22 +18,21 @@ namespace OHOS BPUnderCalibrationView(); ~BPUnderCalibrationView(); static BPUnderCalibrationView *GetInstance(); - UIViewGroup * BPUnderCalibrationInit(); + UIViewGroup *BPUnderCalibrationInit(); void DeInit(); bool AddButton(); bool InitLable(); bool Initbackground(); - - void UpdateTimeText(int data); private: UIImageView *background = nullptr; + UIImageView *lineground = nullptr; UILabelExt *calibrationLabel = nullptr; UILabelExt *remindLabel = nullptr; UILabelExt *timeLabel = nullptr; - UILabel*timenumLabel = nullptr; + UILabel *timenumLabel = nullptr; UIViewGroup *group{nullptr}; }; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPValueView.h b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPValueView.h index f241463c0..7b4cd80f2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPValueView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPValueView.h @@ -10,24 +10,21 @@ #include "components/ui_scroll_view.h" #include "components/ui_label_button_ext.h" - - namespace OHOS { - + static constexpr const char *VALUECHECKBUTTON = "valuecheckButton"; // 校准按钮 class BPValueView { public: BPValueView(); ~BPValueView(); static BPValueView *GetInstance(); - UIViewGroup * BPValueInit(); + UIViewGroup *BPValueInit(); void DeInit(); bool AddButton(); bool InitLable(); bool Initbackground(); - void UpSPO2Text(void); private: UIImageView *background = nullptr; diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPResultAnalysisView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPResultAnalysisView.cpp index ce4776b71..86fd47ca4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPResultAnalysisView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPResultAnalysisView.cpp @@ -14,7 +14,8 @@ namespace OHOS { static BPResultAnalysisView *g_pBPResultAnalysisView{nullptr}; - static const char *BPBACKPATH = "/user/res/BPResultAnalysis/result_background.bin"; + static const char *BPBACKPATH = "/user/res/BPCalibration//W.bin"; + static const char *BPLINEPATH = "/user/res/BPCalibration//Q.bin"; BPResultAnalysisView::BPResultAnalysisView() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BPResultAnalysisView::BPResultAnalysisView"); @@ -32,7 +33,7 @@ namespace OHOS } void BPResultAnalysisView::DeInit() { - if(group) + if (group) { group->RemoveAll(); delete group; @@ -43,11 +44,21 @@ namespace OHOS delete background; background = nullptr; } + if (lineground != nullptr) + { + delete lineground; + lineground = nullptr; + } if (calibrationLabel != nullptr) { delete calibrationLabel; calibrationLabel = nullptr; } + if (mindLabel != nullptr) + { + delete mindLabel; + mindLabel = nullptr; + } } /*** @@ -56,9 +67,9 @@ namespace OHOS */ bool BPResultAnalysisView::InitLable() { - - InitLabel(calibrationLabel, 73, 40, 300, 45, "calibration", "结果分析中", DEFAULT_VECTOR_FONT_FILENAME, 40); - InitLabel(mindLabel,63, 278, 360, 35, "mindLabel", "分析中请勿退出,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 40); + + InitLabel(calibrationLabel, 73, 40, 300, 45, "calibration", "结果分析中", DEFAULT_VECTOR_FONT_FILENAME, 36); + InitLabel(mindLabel, 63, 136, 360, 70, "mindLabel", "分析中请勿退出,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 30); mindLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); mindLabel->SetTextColor(Color::Red()); /*初始化检测时间*/ @@ -74,9 +85,15 @@ namespace OHOS bool BPResultAnalysisView::Initbackground() { background = new UIImageView(); - background->SetPosition(0, 0, 466, 466); + background->SetPosition(0, 62, 466, 342); background->SetSrc(BPBACKPATH); + + lineground = new UIImageView(); + lineground->SetPosition(55, 218, 356, 161); + lineground->SetSrc(BPLINEPATH); + group->Add(background); + group->Add(lineground); return true; } /*** @@ -96,14 +113,14 @@ namespace OHOS if (!Initbackground()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Initbackground error!"); - return nullptr; + return nullptr; }; if (!InitLable()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLable error!"); - return nullptr; + return nullptr; }; return group; } - + } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPSecUnderCalibrationView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPSecUnderCalibrationView.cpp index 39e7b9dc5..d1282ddd3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPSecUnderCalibrationView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPSecUnderCalibrationView.cpp @@ -16,7 +16,8 @@ namespace OHOS { static BPSecUnderCalibrationView *g_pBPSecUnderCalibrationView{nullptr}; - static const char *BPBACKPATH = "/user/res/BPCalibration/calibration_background.bin"; + static const char *BPBACKPATH = "/user/res/BPCalibration//W.bin"; + static const char *BPLINEPATH = "/user/res/BPCalibration//Q.bin"; BPSecUnderCalibrationView::BPSecUnderCalibrationView() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BPSecUnderCalibrationView::BPSecUnderCalibrationView"); @@ -34,42 +35,47 @@ namespace OHOS } void BPSecUnderCalibrationView::DeInit() { - if(group) + if (group) { group->RemoveAll(); delete group; group = nullptr; } if (background != nullptr) - { - delete background; - background = nullptr; - } - if (calibrationLabel != nullptr) - { - delete calibrationLabel; - calibrationLabel = nullptr; - } - if(remindLabel != nullptr) - { - delete remindLabel; - remindLabel = nullptr; - } - if(timeLabel != nullptr) - { - delete timeLabel; - timeLabel = nullptr; - } - if(timenumLabel != nullptr) - { - delete timenumLabel; - timenumLabel = nullptr; - } + { + delete background; + background = nullptr; + } + if (lineground != nullptr) + { + delete lineground; + lineground = nullptr; + } + if (calibrationLabel != nullptr) + { + delete calibrationLabel; + calibrationLabel = nullptr; + } + if (remindLabel != nullptr) + { + delete remindLabel; + remindLabel = nullptr; + } + if (timeLabel != nullptr) + { + delete timeLabel; + timeLabel = nullptr; + } + if (timenumLabel != nullptr) + { + delete timenumLabel; + timenumLabel = nullptr; + } } /* -------------------------------------------------------------------------- */ void BPSecUnderCalibrationView::UpdateTimeText(int data) { - if(timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX) + if (timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX) { timenumLabel->SetText(std::to_string(data).c_str()); } @@ -81,14 +87,14 @@ namespace OHOS */ bool BPSecUnderCalibrationView::InitLable() { - + InitLabel(calibrationLabel, 83, 32, 300, 40, "calibration", "校准中...", DEFAULT_VECTOR_FONT_FILENAME, 35); InitLabel(remindLabel, 63, 278, 360, 35, "remind", "二轮校准中,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 30); remindLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); remindLabel->SetTextColor(Color::Red()); InitLabel(timeLabel, 165, 400, 300, 35, "timeLabel", "秒", DEFAULT_VECTOR_FONT_FILENAME, 30); InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "30", DEFAULT_VECTOR_FONT_FILENAME, 100); - + group->Add(calibrationLabel); group->Add(remindLabel); group->Add(timeLabel); @@ -103,10 +109,15 @@ namespace OHOS bool BPSecUnderCalibrationView::Initbackground() { background = new UIImageView(); - background->SetPosition(0, 0, 466, 466); + background->SetPosition(0, 62, 466, 342); background->SetSrc(BPBACKPATH); + lineground = new UIImageView(); + lineground->SetPosition(49, 95, 356, 161); + lineground->SetSrc(BPLINEPATH); + group->Add(background); + group->Add(lineground); return true; } /*** @@ -126,16 +137,16 @@ namespace OHOS if (!Initbackground()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Initbackground error!"); - return nullptr; + return nullptr; }; if (!InitLable()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLable error!"); - return nullptr; + return nullptr; }; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bool BPSecUnderCalibrationView::InitView()"); return group; } - + } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp index 8604b3663..6014982f7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp @@ -16,7 +16,8 @@ namespace OHOS { static BPUnderCalibrationView *g_pBPUnderCalibrationView{nullptr}; - static const char *BPBACKPATH = "/user/res/BPCalibration/calibration_background.bin"; + static const char *BPBACKPATH = "/user/res/BPCalibration//W.bin"; + static const char *BPLINEPATH = "/user/res/BPCalibration//Q.bin"; BPUnderCalibrationView::BPUnderCalibrationView() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BPUnderCalibrationView::BPUnderCalibrationView"); @@ -34,42 +35,47 @@ namespace OHOS } void BPUnderCalibrationView::DeInit() { - if(group) + if (group) { group->RemoveAll(); delete group; group = nullptr; } if (background != nullptr) - { - delete background; - background = nullptr; - } - if (calibrationLabel != nullptr) - { - delete calibrationLabel; - calibrationLabel = nullptr; - } - if(remindLabel != nullptr) - { - delete remindLabel; - remindLabel = nullptr; - } - if(timeLabel != nullptr) - { - delete timeLabel; - timeLabel = nullptr; - } - if(timenumLabel != nullptr) - { - delete timenumLabel; - timenumLabel = nullptr; - } + { + delete background; + background = nullptr; + } + if (lineground != nullptr) + { + delete lineground; + lineground = nullptr; + } + if (calibrationLabel != nullptr) + { + delete calibrationLabel; + calibrationLabel = nullptr; + } + if (remindLabel != nullptr) + { + delete remindLabel; + remindLabel = nullptr; + } + if (timeLabel != nullptr) + { + delete timeLabel; + timeLabel = nullptr; + } + if (timenumLabel != nullptr) + { + delete timenumLabel; + timenumLabel = nullptr; + } } /* -------------------------------------------------------------------------- */ void BPUnderCalibrationView::UpdateTimeText(int data) { - if(timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX) + if (timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX) { timenumLabel->SetText(std::to_string(data).c_str()); } @@ -81,7 +87,7 @@ namespace OHOS */ bool BPUnderCalibrationView::InitLable() { - + InitLabel(calibrationLabel, 83, 32, 300, 40, "calibration", "校准中...", DEFAULT_VECTOR_FONT_FILENAME, 35); InitLabel(remindLabel, 63, 278, 360, 35, "remind", "首轮校准中,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 30); remindLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); @@ -89,7 +95,7 @@ namespace OHOS InitLabel(timeLabel, 165, 400, 300, 35, "timeLabel", "秒", DEFAULT_VECTOR_FONT_FILENAME, 30); InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "30", DEFAULT_VECTOR_FONT_FILENAME, 100); - + group->Add(calibrationLabel); group->Add(remindLabel); group->Add(timeLabel); @@ -104,10 +110,15 @@ namespace OHOS bool BPUnderCalibrationView::Initbackground() { background = new UIImageView(); - background->SetPosition(0, 0, 466, 466); + background->SetPosition(0, 62, 466, 342); background->SetSrc(BPBACKPATH); + lineground = new UIImageView(); + lineground->SetPosition(49, 95, 356, 161); + lineground->SetSrc(BPLINEPATH); + group->Add(background); + group->Add(lineground); return true; } /*** @@ -127,16 +138,16 @@ namespace OHOS if (!Initbackground()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Initbackground error!"); - return nullptr; + return nullptr; }; if (!InitLable()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLable error!"); - return nullptr; + return nullptr; }; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bool BPUnderCalibrationView::InitView()"); return group; } - + } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPValueView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPValueView.cpp index a8b030dd4..3e861964f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPValueView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPValueView.cpp @@ -14,7 +14,7 @@ namespace OHOS { static BPValueView *g_pBPValueView{nullptr}; - static const char *BPBACKPATH = "/user/res/BPCalibration/calibration_background.bin"; + static const char *BPBACKPATH = "/user/res/BPCalibration/W.bin"; static const char *LEFTPATH = "/user/res/BPCalibration/decrease_button.bin"; static const char *RIGHTPATH = "/user/res/BPCalibration/increase_button.bin"; @@ -89,10 +89,7 @@ namespace OHOS DBPRight = nullptr; } } - /* -------------------------------------------------------------------------- */ - void BPValueView::UpSPO2Text() - { - } + /* -------------------------------------------------------------------------- */ /*** * @description: @@ -101,7 +98,7 @@ namespace OHOS bool BPValueView::AddButton() { InitLabelButton(valuecheckButton, 125, 365, 217, 63, "value_check", "确认", 35); - valuecheckButton->SetViewId("value_check"); + valuecheckButton->SetViewId(VALUECHECKBUTTON); valuecheckButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); // 设置按键颜色 valuecheckButton->SetTextColor(Color::Red()); // 设置按键监听 @@ -135,7 +132,7 @@ namespace OHOS bool BPValueView::Initbackground() { background = new UIImageView(); - background->SetPosition(0, 0, 466, 466); + background->SetPosition(0, 62, 466,342); background->SetSrc(BPBACKPATH); SBPLeft = new UIImageView(); diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/calibration_background.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/calibration_background.bin deleted file mode 100644 index 9374d8584..000000000 --- a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/calibration_background.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f413b424c2826ca775c08fb7e66f1969ac01da6f25d5eda26efd59b94e05871 -size 146040 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/result_background.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/result_background.bin deleted file mode 100644 index b45730376..000000000 --- a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/result_background.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ce35e01036380add97913331115316cda15a5b2c14e3a1d26dc3f54632c2957 -size 146040