1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-19 04:20:17 +01:00

1584740: colours messed up

forgot to remove replacement of ' ', '%' to bg, fg.
doing it now.
This commit is contained in:
mfrasca
2006-10-31 09:57:15 +00:00
parent 41a6ead68b
commit 3af10f51f7

View File

@@ -178,9 +178,7 @@ def initPixmap(background=None,
the remaining lower area defines the character set. this is initialized
using the corresponding named character set. a file with this name must
be found somewhere in the path. the colors used in the xpm file for
the charset must be ' ' and '%'. they will be changed here to bg and
fg.
be found somewhere in the path.
palette is a dictionary
1: of integers <- [0..15] to colors.
@@ -277,9 +275,9 @@ def initPixmap(background=None,
width, height = [int(item) for item in m.groups()]
replace = []
for code, value in [(code, value)
for (code, value) in font_palette.items()
if not available[code]]:
for code, value in font_palette.items():
if available[code]:
continue
if palette[code] != font_palette[code]:
newcode = [k for k in available if available[k]][0]
available[newcode] = False
@@ -345,7 +343,7 @@ def initPixmap(background=None,
item+' '*(xpmwidth-len(item))
for item in background + patterns
] + [
line.replace('%', fg).replace(' ', bg) + ' '*(xpmwidth-len(line))
line + ' '*(xpmwidth-len(line))
for line in fontdef
]
if debug: