From 70a5bc50ed0099f5191f449edf82937a6bb70577 Mon Sep 17 00:00:00 2001 From: mfrasca <> Date: Thu, 12 Oct 2006 18:27:08 +0000 Subject: [PATCH] 1575762: initialization of pixmask made some mess about borders: the whole tile is now used up by the application. colour 0 seems to be reserved for transparency. --- examples/pywmhdmon.py | 4 ++-- wmdocklib/pywmhelpers.py | 14 +++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/examples/pywmhdmon.py b/examples/pywmhdmon.py index 8fded36..78485c8 100755 --- a/examples/pywmhdmon.py +++ b/examples/pywmhdmon.py @@ -537,8 +537,8 @@ background = \ ] char_width, char_height = wmdocklib.initPixmap(background, - font_name='6x8', - bg='7', fg='a') + font_name='5x7', + bg='8', fg='a') if __name__ == '__main__': main() diff --git a/wmdocklib/pywmhelpers.py b/wmdocklib/pywmhelpers.py index b6cc47a..c52dfe1 100644 --- a/wmdocklib/pywmhelpers.py +++ b/wmdocklib/pywmhelpers.py @@ -180,10 +180,10 @@ def initPixmap(xpm_background=None, """ if xpm_background is None: - xpm_background = [bg*width]*height + xpm_background = ['0'*width]*2 + ['00'+bg*(width-4)+'00']*(height-4) + ['0'*width]*2 if palette is None: palette = { - 0: ('#000000','black'), + 0: ('#000000','transparent'), 1: ('#000080','blue'), 2: ('#008080','cyan'), 3: ('#008000','green'), @@ -191,7 +191,7 @@ def initPixmap(xpm_background=None, 5: ('#800000','red'), 6: ('#800080','purple'), 7: ('#c0c0c0','light_gray'), - 8: ('#808080','dark_gray'), + 8: ('#010101','black'), 9: ('#0000ff','light_blue'), 10: ('#00ffff','light_cyan'), 11: ('#00ff00','light_green'), @@ -463,12 +463,4 @@ char_defs = { ] }, } - -default_xpm_header = [ - '128 112 4 1', - '_\tc #7f260a', - ' \tc #000000 s background', - '/\tc #2020b2 s graph', - '%\tc #2081B2 s text', - ]