From 94471aab827d152375514a8bf69ac2f751e3ca67 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 19 Jan 2009 19:01:11 +0000 Subject: Use reverse rather than background which doesn't show up when terminal doesn't support colours. --- clock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clock.c') diff --git a/clock.c b/clock.c index f79546d0..df54b290 100644 --- a/clock.c +++ b/clock.c @@ -1,4 +1,4 @@ -/* $Id: clock.c,v 1.1 2009-01-11 00:48:42 nicm Exp $ */ +/* $Id: clock.c,v 1.2 2009-01-19 19:01:11 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -113,6 +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; 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) { @@ -149,9 +150,9 @@ clock_draw(struct screen_write_ctx *ctx, u_int colour, int style) screen_write_cursormove(ctx, x, y + j); for (i = 0; i < 5; i++) { if (clock_table[idx][j][i]) - gc.bg = colour; + gc.attr |= GRID_ATTR_REVERSE; else - gc.bg = 0; + gc.attr &= ~GRID_ATTR_REVERSE; screen_write_putc(ctx, &gc, ' '); } } -- cgit