From 87fb852bcfafe5f2113348827159acb3fa0bc243 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Sun, 11 Dec 2022 22:29:58 +0300 Subject: [PATCH] Weather Station: Fix display of temps lower than -9 (#2120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: あく --- .../views/weather_station_receiver_info.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/applications/plugins/weather_station/views/weather_station_receiver_info.c b/applications/plugins/weather_station/views/weather_station_receiver_info.c index c2fa0064..05809921 100644 --- a/applications/plugins/weather_station/views/weather_station_receiver_info.c +++ b/applications/plugins/weather_station/views/weather_station_receiver_info.c @@ -82,8 +82,14 @@ void ws_view_receiver_info_draw(Canvas* canvas, WSReceiverInfoModel* model) { if(model->generic->temp != WS_NO_TEMPERATURE) { canvas_draw_icon(canvas, 6, 43, &I_Therm_7x16); snprintf(buffer, sizeof(buffer), "%3.1f C", (double)model->generic->temp); - canvas_draw_str_aligned(canvas, 47, 47, AlignRight, AlignTop, buffer); - canvas_draw_circle(canvas, 38, 46, 1); + uint8_t temp_x1 = 47; + uint8_t temp_x2 = 38; + if(model->generic->temp < -9.0) { + temp_x1 = 49; + temp_x2 = 40; + } + canvas_draw_str_aligned(canvas, temp_x1, 47, AlignRight, AlignTop, buffer); + canvas_draw_circle(canvas, temp_x2, 46, 1); } if(model->generic->humidity != WS_NO_HUMIDITY) {