Fix vertical text centering edge-case (affects Chalk)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user