From: luozheng <1732036298@qq.com> Date: Tue, 16 Jul 2024 03:44:44 +0000 (+0800) Subject: 指南针界面UI显示居中,去掉~字符 X-Git-Tag: release_V1.2.70_20241020_135402~812 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=4d00af7f9c7cea7667e535f63e89c55e91dc12cf;p=mirrors%2FFD230.git 指南针界面UI显示居中,去掉~字符 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassPresenter.cpp index 73a8d76df..9649379dc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassPresenter.cpp @@ -78,11 +78,13 @@ CompassPresenter* CompassPresenter::GetInstance(void) void CompassPresenter::DisplayAngleRight(uint16_t angle) { if ((angle >= RIGHT_WESTNORTH_UP_338) || (angle >= 0 && angle < RIGHT_NORTH_DOWN_23)) { - CompassView::GetInstance()->DirectionSetText(NORTH_DIRECTION, ("~" + std::to_string(angle) + "°").c_str()); + //CompassView::GetInstance()->DirectionSetText(NORTH_DIRECTION, ("~" + std::to_string(angle) + "°").c_str()); + CompassView::GetInstance()->DirectionSetText(NORTH_DIRECTION, (std::to_string(angle) + "°").c_str()); } for (int i = 0; i < DIRECTION_COUNT; i++) { if ((angle >= g_compassList[i].beginAngle) && (angle < g_compassList[i].endAngle)) { CompassView::GetInstance()->DirectionSetText(g_compassList[i].dir, ("~" + std::to_string(angle) + "°").c_str()); + CompassView::GetInstance()->DirectionSetText(g_compassList[i].dir, (std::to_string(angle) + "°").c_str()); } } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassView.cpp b/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassView.cpp index dd8329f6b..f9be6a5f6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/compass/src/CompassView.cpp @@ -25,7 +25,7 @@ static constexpr int16_t DIRECTIONLABEL_TEXT_HEIGH = 76; static constexpr int16_t DIRECTIONLABEL_FONT_TEXT_SIZE = 65; static constexpr int16_t DIRECTIONLABEL_STYLE_LINE_HEIGHT = 76; -static constexpr int16_t ANGLEDLABEL_X = 136; +static constexpr int16_t ANGLEDLABEL_X = 168; static constexpr int16_t ANGLEDLABEL_Y = 240; static constexpr int16_t ANGLEDLABEL_TEXT_WIDTH = 194; static constexpr int16_t ANGLEDLABEL_TEXT_HEIGHT = 94; @@ -217,7 +217,7 @@ bool CompassView::InitPage(void) } angledLabel->SetPosition(ANGLEDLABEL_X, ANGLEDLABEL_Y); angledLabel->Resize(ANGLEDLABEL_TEXT_WIDTH, ANGLEDLABEL_TEXT_HEIGHT); - angledLabel->SetText("~0°"); + angledLabel->SetText("0°"); angledLabel->SetStyle(STYLE_TEXT_FONT, ANGLEDLABEL_FONT_TEXT_SIZE); angledLabel->SetStyle(STYLE_LINE_HEIGHT, ANGLEDLABEL_STYLE_LINE_HEIGHT); angledLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, ANGLEDLABEL_FONT_TEXT_SIZE);