Make clock visible on terminals without colours, from Manuel Einfalt in

GitHub issue 5001.
This commit is contained in:
nicm
2026-04-22 07:05:59 +00:00
parent 303edb71bd
commit fee70031f6

View File

@@ -282,6 +282,7 @@ window_clock_draw_screen(struct window_mode_entry *wme)
memcpy(&gc, &grid_default_cell, sizeof gc); memcpy(&gc, &grid_default_cell, sizeof gc);
gc.flags |= GRID_FLAG_NOPALETTE; gc.flags |= GRID_FLAG_NOPALETTE;
gc.bg = colour; gc.bg = colour;
gc.fg = colour;
for (ptr = tim; *ptr != '\0'; ptr++) { for (ptr = tim; *ptr != '\0'; ptr++) {
if (*ptr >= '0' && *ptr <= '9') if (*ptr >= '0' && *ptr <= '9')
idx = *ptr - '0'; idx = *ptr - '0';
@@ -302,7 +303,7 @@ window_clock_draw_screen(struct window_mode_entry *wme)
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
screen_write_cursormove(&ctx, x + i, y + j, 0); screen_write_cursormove(&ctx, x + i, y + j, 0);
if (window_clock_table[idx][j][i]) if (window_clock_table[idx][j][i])
screen_write_putc(&ctx, &gc, ' '); screen_write_putc(&ctx, &gc, '#');
} }
} }
x += 6; x += 6;