c: text height as a const

This commit is contained in:
He4eT 2025-11-25 12:46:34 +01:00
commit d43b063de8

View file

@ -25,7 +25,7 @@ static void prv_window_load(Window *window) {
Layer *window_layer = window_get_root_layer(window); Layer *window_layer = window_get_root_layer(window);
GRect bounds = layer_get_bounds(window_layer); GRect bounds = layer_get_bounds(window_layer);
int text_h = 32 + 10; const int text_h = 32 + 10;
GRect text_bounds = GRect(0, (bounds.size.h - text_h) / 2, bounds.size.w, text_h); GRect text_bounds = GRect(0, (bounds.size.h - text_h) / 2, bounds.size.w, text_h);
GFont text_font = fonts_get_system_font(FONT_KEY_LECO_32_BOLD_NUMBERS); GFont text_font = fonts_get_system_font(FONT_KEY_LECO_32_BOLD_NUMBERS);