From f57b6d83abe9e7f85f654a9a07c02f9a8be9245c Mon Sep 17 00:00:00 2001 From: Claudio <71095411+rojas-claudio@users.noreply.github.com> Date: Sat, 22 Aug 2026 18:33:40 -0700 Subject: [PATCH] fix vertical offset and scale popup text on larger displays --- src/popup_window.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/popup_window.c b/src/popup_window.c index 8757e93..68d5986 100644 --- a/src/popup_window.c +++ b/src/popup_window.c @@ -277,13 +277,20 @@ static void prv_window_load(Window* window){ layer_set_update_proc(popup_window->layer, layer_update_proc); layer_add_child(root, popup_window->layer); // text -#ifndef PBL_PLATFORM_APLITE - const int text_layer_origin_y = 125; -#else +#if (PBL_DISPLAY_HEIGHT > 180) // emery, gabbro, and any other pebble with a larger display + const int text_layer_origin_y = 162; +#elif PBL_PLATFORM_APLITE const int text_layer_origin_y = 110; +#else + const int text_layer_origin_y = 125; #endif + popup_window->text = text_layer_create(GRect(0, text_layer_origin_y, bounds.size.w, 36)); +#if (PBL_DISPLAY_HEIGHT > 180) // emery, gabbro, and any other pebble with a larger display + text_layer_set_font(popup_window->text, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); +#else text_layer_set_font(popup_window->text, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); +#endif text_layer_set_text_alignment(popup_window->text, GTextAlignmentCenter); text_layer_set_background_color(popup_window->text, GColorClear); text_layer_set_text(popup_window->text, popup_window->title);