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:
@@ -178,9 +178,7 @@ def initPixmap(background=None,
|
|||||||
|
|
||||||
the remaining lower area defines the character set. this is initialized
|
the remaining lower area defines the character set. this is initialized
|
||||||
using the corresponding named character set. a file with this name must
|
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
|
be found somewhere in the path.
|
||||||
the charset must be ' ' and '%'. they will be changed here to bg and
|
|
||||||
fg.
|
|
||||||
|
|
||||||
palette is a dictionary
|
palette is a dictionary
|
||||||
1: of integers <- [0..15] to colors.
|
1: of integers <- [0..15] to colors.
|
||||||
@@ -199,9 +197,9 @@ def initPixmap(background=None,
|
|||||||
# color. per default we offer a 16 colors palette including what I
|
# color. per default we offer a 16 colors palette including what I
|
||||||
# consider the basic colors:
|
# consider the basic colors:
|
||||||
basic_colors = ['black', 'blue3', 'green3', 'cyan3',
|
basic_colors = ['black', 'blue3', 'green3', 'cyan3',
|
||||||
'red3', 'magenta3', 'yellow3', 'gray',
|
'red3', 'magenta3', 'yellow3', 'gray',
|
||||||
'gray41', 'blue1', 'green1', 'cyan1',
|
'gray41', 'blue1', 'green1', 'cyan1',
|
||||||
'red1', 'magenta1', 'yellow1', 'white']
|
'red1', 'magenta1', 'yellow1', 'white']
|
||||||
|
|
||||||
alter_palette, palette = palette, {}
|
alter_palette, palette = palette, {}
|
||||||
for name, index in zip(basic_colors, range(16)):
|
for name, index in zip(basic_colors, range(16)):
|
||||||
@@ -277,9 +275,9 @@ def initPixmap(background=None,
|
|||||||
width, height = [int(item) for item in m.groups()]
|
width, height = [int(item) for item in m.groups()]
|
||||||
|
|
||||||
replace = []
|
replace = []
|
||||||
for code, value in [(code, value)
|
for code, value in font_palette.items():
|
||||||
for (code, value) in font_palette.items()
|
if available[code]:
|
||||||
if not available[code]]:
|
continue
|
||||||
if palette[code] != font_palette[code]:
|
if palette[code] != font_palette[code]:
|
||||||
newcode = [k for k in available if available[k]][0]
|
newcode = [k for k in available if available[k]][0]
|
||||||
available[newcode] = False
|
available[newcode] = False
|
||||||
@@ -345,7 +343,7 @@ def initPixmap(background=None,
|
|||||||
item+' '*(xpmwidth-len(item))
|
item+' '*(xpmwidth-len(item))
|
||||||
for item in background + patterns
|
for item in background + patterns
|
||||||
] + [
|
] + [
|
||||||
line.replace('%', fg).replace(' ', bg) + ' '*(xpmwidth-len(line))
|
line + ' '*(xpmwidth-len(line))
|
||||||
for line in fontdef
|
for line in fontdef
|
||||||
]
|
]
|
||||||
if debug:
|
if debug:
|
||||||
|
|||||||
Reference in New Issue
Block a user