Skip to content

Commit

Permalink
Recenter the pressure canvas if hPa unit is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
shininghero authored Nov 22, 2024
1 parent 55bfd85 commit bc4e84e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion base_pack/unitemp/views/General_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ static void _draw_heat_index(Canvas* canvas, Sensor* sensor, const uint8_t pos[2
}

static void _draw_pressure(Canvas* canvas, Sensor* sensor) {
const uint8_t x = 29, y = 39;
uint8_t x = 29, y = 39;
//Slide the canvas over slightly to account for the larger hPa values
if(app->settings.pressure_unit == UT_PRESSURE_HPA) {
x = 21;
} else {
x = 29;
}
//Рисование рамки
if(app->settings.pressure_unit == UT_PRESSURE_HPA) {
canvas_draw_rframe(canvas, x, y, 84, 20, 3);
Expand Down

0 comments on commit bc4e84e

Please sign in to comment.