From: hcj <1224667075@qq.com> Date: Fri, 27 Sep 2024 07:05:16 +0000 (+0800) Subject: 修复产测代码默认使用sc字体,不随全局切换改变 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=1bd35bf4a97e2274027946d71f1f8819d01b3445;p=mirrors%2FFD230.git 修复产测代码默认使用sc字体,不随全局切换改变 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testA5133.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testA5133.cpp index 6a49d8ed0..eef30b201 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testA5133.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testA5133.cpp @@ -144,7 +144,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); @@ -252,7 +252,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); label->SetAlign(TEXT_ALIGNMENT_LEFT); label->SetStyle(STYLE_BORDER_COLOR, 0xff0176ff); label->SetStyle(STYLE_BORDER_COLOR, 0xff0176ff); @@ -369,7 +369,7 @@ namespace OHOS label_a5133_SCAN[0]->SetLineBreakMode(UILabel::LINE_BREAK_ELLIPSIS); label_a5133_SCAN[0]->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); label_a5133_SCAN[0]->SetRollSpeed(0); - label_a5133_SCAN[0]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 25); + label_a5133_SCAN[0]->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 25); // Add to rootView testa5133ScrollView->Add(label_a5133_SCAN[0]); diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPing.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPing.cpp index 79ba84432..f986b087c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPing.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPing.cpp @@ -105,7 +105,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); @@ -129,7 +129,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); // label->SetAlign(TEXT_ALIGNMENT_LEFT); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testSEChipTest.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testSEChipTest.cpp index fe8e4e4bf..4d31992c3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testSEChipTest.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testSEChipTest.cpp @@ -104,7 +104,7 @@ namespace OHOS label->SetText(labelConfig.text.c_str()); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testView.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testView.cpp index aa1ae3861..91776c5ff 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testView.cpp @@ -225,7 +225,7 @@ namespace OHOS SystemLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); SystemLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); SystemLabel->SetRollSpeed(6); - SystemLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); + SystemLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 30); return true; @@ -253,7 +253,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); //button->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); button->SetImagePosition(326, 37); diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testabout.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testabout.cpp index 81ea64287..cb0e0f23d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testabout.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testabout.cpp @@ -135,7 +135,7 @@ namespace OHOS // Set additional property label_button->SetText("next"); - label_button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 44); + label_button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 44); label_button->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); label_button->SetStyle(STYLE_BACKGROUND_OPA, 0x80); @@ -163,7 +163,7 @@ namespace OHOS label->Resize(200, 62); // Set additional property label->SetText(view_text); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 30); label->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); label->SetVisible(true); @@ -185,7 +185,7 @@ namespace OHOS label->SetText(labelConfig.text.c_str()); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbt.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbt.cpp index b3f402aae..71a5668df 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbt.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbt.cpp @@ -128,7 +128,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); @@ -201,7 +201,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); label->SetAlign(TEXT_ALIGNMENT_LEFT); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbutton.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbutton.cpp index af099e860..f6aae6542 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbutton.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testbutton.cpp @@ -101,7 +101,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); // UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); // button->SetOnClickListener(touchListener); @@ -221,7 +221,7 @@ namespace OHOS label_crown->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); label_crown->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); label_crown->SetRollSpeed(0); - label_crown->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 50); + label_crown->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 50); testBUTTONScrollView->Add(label_crown); diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp index ecab799c7..91898dab2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp @@ -132,7 +132,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); @@ -173,7 +173,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); label->SetAlign(TEXT_ALIGNMENT_LEFT); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testchanging.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testchanging.cpp index 41f8cafce..24efbe726 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testchanging.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testchanging.cpp @@ -100,7 +100,7 @@ namespace OHOS button->SetText("usb::stat"); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); //button->SetOnTouchListener(clickListener); // UIView::OnDragListener *drgListener = static_cast(testPresenter::GetInstance()); diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testgsenson.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testgsenson.cpp index 03c9fe2c5..42e5ec5dd 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testgsenson.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testgsenson.cpp @@ -139,7 +139,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testhrsenson.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testhrsenson.cpp index b1d6c9e8e..0f0f5102a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testhrsenson.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testhrsenson.cpp @@ -146,7 +146,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); @@ -193,7 +193,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); label->SetAlign(TEXT_ALIGNMENT_LEFT); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmagnetic.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmagnetic.cpp index b791d4523..64bb1ea84 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmagnetic.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmagnetic.cpp @@ -141,7 +141,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmicrophone.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmicrophone.cpp index 7345cabc8..103088db6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmicrophone.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmicrophone.cpp @@ -104,7 +104,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmotor.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmotor.cpp index c3147c410..87d21ff89 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmotor.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testmotor.cpp @@ -98,7 +98,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testold.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testold.cpp index ce818e8dd..f1351fa15 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testold.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testold.cpp @@ -202,7 +202,7 @@ namespace OHOS label->SetText(labelConfig.text); // 内容 label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); - label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); return label; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testspeak.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testspeak.cpp index e23cba250..27437d64e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testspeak.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testspeak.cpp @@ -99,7 +99,7 @@ namespace OHOS button->SetText(buttonconfig.str); button->SetAlign(TEXT_ALIGNMENT_LEFT); button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); - button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); button->SetOnClickListener(touchListener); diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleModel.cpp index 67b5ebd9b..57353d86d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleModel.cpp @@ -77,6 +77,10 @@ namespace OHOS { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScheduleOriginalDataSetByApp,%d,%d", index, is_finish); uint8_t len = 0; + if(index>=SCHEDULE_DATA_COUNT_MAX) + { + return; + } ScheduleOriginalData_[index].date.assign(data->date);