From 4567e5adc5fc7a3b496e39b4b9ddb61f7fa1aca8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 26 Feb 2014 10:11:14 +0100 Subject: using colours MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/__main__.py b/src/__main__.py index 72575cf..e04c044 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -25,7 +25,6 @@ from x import * open_x() width, height, left, top, panel_height, at_top = get_monitors()[0][:3] + [24, 1 * 12, True] -print(width, height, left, top) display = get_display() window = create_panel(width, height, left, top, panel_height, at_top) @@ -41,7 +40,9 @@ while True: break except KeyboardInterrupt: break - gc.change(foreground = get_screen().black_pixel) + cmap = window.get_attributes().colormap + print(cmap) + gc.change(foreground = cmap.alloc_color(0xFFFF, 0x0000, 0x4000).pixel) window.fill_rectangle(gc, 0, 0, width, panel_height) display.flush() -- cgit v1.2.3-70-g09d2