Display sleep time larger on small rectangular displays

This commit is contained in:
2026-05-03 17:04:27 -04:00
parent b598bbb8cb
commit 8711d8cb64

View File

@@ -3,7 +3,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
// #define DEBUG_MODE 1 #define DEBUG_MODE 1
// declare settings-derived statics // declare settings-derived statics
static uint8_t s_is_jellyfin; static uint8_t s_is_jellyfin;
@@ -113,9 +113,9 @@ static void main_window_load(Window *window) {
text_layer_set_text_alignment(s_sleep_time_layer, GTextAlignmentCenter); text_layer_set_text_alignment(s_sleep_time_layer, GTextAlignmentCenter);
text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_28)); text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_28));
#else #else
s_sleep_time_layer = text_layer_create(GRect(PBL_IF_ROUND_ELSE(0, 31), PBL_IF_ROUND_ELSE(24, 3), PBL_DISPLAY_WIDTH, 30)); s_sleep_time_layer = text_layer_create(GRect(PBL_IF_ROUND_ELSE(0, 31), PBL_IF_ROUND_ELSE(24, -2), PBL_DISPLAY_WIDTH, 30));
s_last_watched_layer = text_layer_create(GRect(PBL_IF_ROUND_ELSE(28, 4), PBL_DISPLAY_HEIGHT / 2 - 17, PBL_DISPLAY_WIDTH - PBL_IF_ROUND_ELSE(56, 29), PBL_DISPLAY_HEIGHT)); s_last_watched_layer = text_layer_create(GRect(PBL_IF_ROUND_ELSE(28, 4), PBL_DISPLAY_HEIGHT / 2 - 17, PBL_DISPLAY_WIDTH - PBL_IF_ROUND_ELSE(56, 29), PBL_DISPLAY_HEIGHT));
text_layer_set_font(s_sleep_time_layer, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); text_layer_set_font(s_sleep_time_layer, fonts_get_system_font(PBL_IF_ROUND_ELSE(FONT_KEY_GOTHIC_18_BOLD, FONT_KEY_GOTHIC_24_BOLD)));
text_layer_set_text_alignment(s_sleep_time_layer, PBL_IF_ROUND_ELSE(GTextAlignmentCenter, GTextAlignmentLeft)); text_layer_set_text_alignment(s_sleep_time_layer, PBL_IF_ROUND_ELSE(GTextAlignmentCenter, GTextAlignmentLeft));
text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24)); text_layer_set_font(s_last_watched_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24));
#endif #endif