summaryrefslogtreecommitdiffstats
path: root/clock.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-19 19:01:11 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-19 19:01:11 +0000
commit94471aab827d152375514a8bf69ac2f751e3ca67 (patch)
tree4147ecfa671f43e05695c8355f77f2a4c65fdee0 /clock.c
parent5e55b28d81062f80a785488836bb149e7fedb409 (diff)
Use reverse rather than background which doesn't show up when terminal doesn't
support colours.
Diffstat (limited to 'clock.c')
-rw-r--r--clock.c7
1 files changed, 4 insertions, 3 deletions
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 <nicm@users.sourceforge.net>
@@ -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, ' ');
}
}