mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-26 08:38:51 +01:00
Fix clock mode in black and white terminals now that tty.c tries to fix
reverse.
This commit is contained in:
parent
f949107a32
commit
1ba5ce9cb3
7
clock.c
7
clock.c
@ -113,7 +113,7 @@ clock_draw(struct screen_write_ctx *ctx, u_int colour, int style)
|
||||
|
||||
screen_write_clearscreen(ctx);
|
||||
memcpy(&gc, &grid_default_cell, sizeof gc);
|
||||
gc.fg = colour;
|
||||
gc.bg = colour;
|
||||
|
||||
if (screen_size_x(s) < 6 * strlen(tim) || screen_size_y(s) < 6) {
|
||||
if (screen_size_x(s) >= strlen(tim) && screen_size_y(s) != 0) {
|
||||
@ -147,12 +147,9 @@ clock_draw(struct screen_write_ctx *ctx, u_int colour, int style)
|
||||
}
|
||||
|
||||
for (j = 0; j < 5; j++) {
|
||||
screen_write_cursormove(ctx, x, y + j);
|
||||
for (i = 0; i < 5; i++) {
|
||||
screen_write_cursormove(ctx, x + i, y + j);
|
||||
if (clock_table[idx][j][i])
|
||||
gc.attr |= GRID_ATTR_REVERSE;
|
||||
else
|
||||
gc.attr &= ~GRID_ATTR_REVERSE;
|
||||
screen_write_putc(ctx, &gc, ' ');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user