From 967dd3578ad970eea993416b4884d68752d60d02 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Tue, 29 Oct 2024 15:33:23 +0800 Subject: [PATCH] =?utf8?q?=E6=B4=BB=E5=8A=A8=E7=95=8C=E9=9D=A2UI=E4=BF=AE?= =?utf8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/goal/src/goalother.cpp | 18 +++++++++--------- .../fd230app/nativeui/goal/src/goalview.cpp | 10 +++++----- .../src/notify/goal_notification.cpp | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalother.cpp b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalother.cpp index b61448cdb..f17ad650e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalother.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalother.cpp @@ -306,7 +306,7 @@ namespace OHOS mileagenowdataLabel->SetTextColor(Color::GetColorFromRGBA(0x4F, 0xC3, 0x4C, 0xff)); mileagenowdataLabel->SetAlign(TEXT_ALIGNMENT_RIGHT, TEXT_ALIGNMENT_CENTER); mileagenowdataLabel->SetRollSpeed(0); - mileagenowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + mileagenowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); mileagenowdataLabel->SetVisible(true); // Add Label to App @@ -324,7 +324,7 @@ namespace OHOS mileagegoaldataLabel->SetTextColor(Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff)); mileagegoaldataLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); mileagegoaldataLabel->SetRollSpeed(0); - mileagegoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + mileagegoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); mileagegoaldataLabel->SetVisible(true); ///////////////////////燃脂/////////////////////////// @@ -342,7 +342,7 @@ namespace OHOS fatburningnowdataLabel->SetTextColor(Color::GetColorFromRGBA(0x4F, 0xC3, 0x4C, 0xff)); fatburningnowdataLabel->SetAlign(TEXT_ALIGNMENT_RIGHT, TEXT_ALIGNMENT_CENTER); fatburningnowdataLabel->SetRollSpeed(0); - fatburningnowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + fatburningnowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); fatburningnowdataLabel->SetVisible(true); // Add Label to App if (fatburninggoaldataLabel == nullptr) { @@ -359,7 +359,7 @@ namespace OHOS fatburninggoaldataLabel->SetTextColor(Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff)); fatburninggoaldataLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); fatburninggoaldataLabel->SetRollSpeed(0); - fatburninggoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + fatburninggoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); fatburninggoaldataLabel->SetVisible(true); ///////////////////////站立/////////////////////////// if (standnowdataLabel == nullptr) { @@ -377,7 +377,7 @@ namespace OHOS standnowdataLabel->SetTextColor(Color::GetColorFromRGBA(0x4F, 0xC3, 0x4C, 0xff)); standnowdataLabel->SetAlign(TEXT_ALIGNMENT_RIGHT, TEXT_ALIGNMENT_CENTER); standnowdataLabel->SetRollSpeed(0); - standnowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + standnowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); standnowdataLabel->SetVisible(true); if (standgoaldataLabel == nullptr) { @@ -394,7 +394,7 @@ namespace OHOS standgoaldataLabel->SetTextColor(Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff)); standgoaldataLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); standgoaldataLabel->SetRollSpeed(0); - standgoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + standgoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); ///////////////////////卡路里/////////////////////////// if (calorienowdataLabel == nullptr) { @@ -411,14 +411,14 @@ namespace OHOS calorienowdataLabel->SetTextColor(Color::GetColorFromRGBA(0x4F, 0xC3, 0x4C, 0xff)); calorienowdataLabel->SetAlign(TEXT_ALIGNMENT_RIGHT, TEXT_ALIGNMENT_CENTER); calorienowdataLabel->SetRollSpeed(0); - calorienowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + calorienowdataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); calorienowdataLabel->SetVisible(true); if (caloriegoaldataLabel == nullptr) { caloriegoaldataLabel = new UILabel(); } caloriegoaldataLabel->SetPosition(243-20-10, 353); // widget's left position and top position - caloriegoaldataLabel->Resize(82, 60); // widget's width and height + caloriegoaldataLabel->Resize(82+40, 60); // widget's width and height caloriegoaldataLabel->SetViewId("label2");// Set style caloriegoaldataLabel->SetStyle(STYLE_TEXT_FONT, 40); @@ -429,7 +429,7 @@ namespace OHOS caloriegoaldataLabel->SetTextColor(Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff)); caloriegoaldataLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); caloriegoaldataLabel->SetRollSpeed(0); - caloriegoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + caloriegoaldataLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); caloriegoaldataLabel->SetVisible(true); if (PullUpAnimatorView == nullptr) diff --git a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp index 2c63936af..7458f5b92 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp @@ -169,20 +169,20 @@ namespace OHOS if (nowstepLabel == nullptr) { nowstepLabel = new UILabelExt(); } - nowstepLabel->SetPosition(121, 201); // widget's left position and top position - nowstepLabel->Resize(223, 94); // widget's width and height + nowstepLabel->SetPosition(121-40, 201); // widget's left position and top position + nowstepLabel->Resize(223+80, 94); // widget's width and height nowstepLabel->SetViewId("nowstepLabel");// Set style nowstepLabel->SetStyle(STYLE_TEXT_FONT, 80); // Set additional property - nowstepLabel->SetText(GoalModel::GetInstance().getstepnew()); + nowstepLabel->SetText(GoalModel::GetInstance().getstepnew());//); nowstepLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); //nowstepLabel->SetTextColor(0x4FC34C); nowstepLabel->SetTextColor(Color::GetColorFromRGBA(0x4F, 0xC3, 0x4C, 0xff)); nowstepLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); nowstepLabel->SetRollSpeed(0); - nowstepLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 80); + nowstepLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 80); // Add Label to App @@ -200,7 +200,7 @@ namespace OHOS goalstepLabel->SetTextColor(Color::GetColorFromRGBA(0x99, 0x99, 0x99, 0xff)); goalstepLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); goalstepLabel->SetRollSpeed(0); - goalstepLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); + goalstepLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40); /*----------------------------------------------------------------------------- */ diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp index 348a9c0e6..9487c70a9 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp @@ -382,7 +382,7 @@ namespace OHOS { uint8_t tagType =flag_goal; std::string tagString; - uint8_t tag=0; + uint32_t tag=0; switch (tagType) { case GOAL_CALOREIE: tag = ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_CALORIES); -- 2.17.1