From 6a5fc7b52ec7dbc241b2b34e7f4a2aac72b19694 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 10 May 2026 00:05:56 -0400 Subject: [PATCH] Fix vertical text centering edge-case (affects Chalk) --- src/c/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/c/main.c b/src/c/main.c index 8b55afa..eae839c 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -3,7 +3,7 @@ #include #include -#define DEBUG_MODE 1 +// #define DEBUG_MODE 1 // declare settings-derived statics static uint8_t s_is_jellyfin; @@ -61,8 +61,9 @@ static void write_last_watched(const char *text) { // for each additional row beyond 1, shift up by half a row's height uint16_t y = s_base_shift - ((current_rows - 1) * (LW_FONT_SIZE / 2)); - // if the top extends above the sleep bar, force it below it - if (y < s_sleep_bar_drop) { + // if the top extends above the sleep bar, force it below it; + // account for blank pixels above text to avoid forcing position when not visually necessary + if (y + s_wasted_top_text_pixels < s_sleep_bar_drop) { y = s_sleep_bar_drop - s_wasted_top_text_pixels + s_margin; }