1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-23 14:42:32 +01:00

1575762: initialization of pixmask

configurable margin...  unsure if it works in all cases.
This commit is contained in:
mfrasca
2006-10-12 19:49:22 +00:00
parent 408fed815b
commit cb34659206

View File

@@ -157,6 +157,7 @@ def initPixmap(xpm_background=None,
font_name='6x8', font_name='6x8',
bg='0', fg='7', bg='0', fg='7',
width=64, height=64, width=64, height=64,
margin=3,
palette=None): palette=None):
"""builds and sets the pixmap of the program. """builds and sets the pixmap of the program.
@@ -218,11 +219,11 @@ def initPixmap(xpm_background=None,
'%x\tc %s s %s' % (k, v[0], v[-1]) '%x\tc %s s %s' % (k, v[0], v[-1])
for k,v in palette.items() for k,v in palette.items()
] + [ ] + [
'0'*64 + item for item in xpm_background[:3] '0'*width + item for item in xpm_background[:margin]
] + [ ] + [
'000'+bg*(64-8)+'00000' + item for item in xpm_background[3:-4] '0'*margin+bg*(width-margin-margin-2)+'0'*(margin+2) + item for item in xpm_background[margin:-margin-1]
] + [ ] + [
'0'*64 + item for item in xpm_background[-4:] '0'*width + item for item in xpm_background[-margin-1:]
] + [ ] + [
line.replace('%', fg).replace(' ', bg) line.replace('%', fg).replace(' ', bg)
for line in char_map for line in char_map