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

1584740: colours messed up

modified the fonts: they start from background colour (None or Black) and go
to full intensity, which ought to be gray100 or white.

the initialization procedure will spread all colour differences between the
requested background and foreground proportionally to the intensity of the
gray char pixel.

most colour code clashes are resolved at initialization stage.  there are
only a few things you should not reuse, such as the space for transparency.
just try out the result and make use of the 'debug' parameter which will
cause the function to print the the generated xpm.
This commit is contained in:
mfrasca
2006-10-26 08:41:00 +00:00
parent 77098c749d
commit 3c127f9849
16 changed files with 116 additions and 51 deletions

View File

@@ -513,7 +513,8 @@ class PywmGeneric:
def parseCommandLine(argv):
"""Parse the commandline. Return a dictionary with options and values."""
shorts = 'ht:b:r:c:F:'
longs = ['help', 'text=', 'background=', 'rgbfile=', 'configfile=', 'font=']
longs = ['help', 'text=', 'background=', 'rgbfile=', 'configfile=',
'font=', 'debug']
try:
opts, nonOptArgs = getopt.getopt(argv[1:], shorts, longs)
except getopt.GetoptError, e:
@@ -535,6 +536,8 @@ def parseCommandLine(argv):
d['rgbfile'] = a
if o in ('-c', '--configfile'):
d['configfile'] = a
if o in ('--debug'):
d['debug'] = True
return d
def readConfigFile(fileName):
@@ -634,21 +637,20 @@ def main():
clConfig = parseCommandLine(sys.argv)
palette = {
' ': '#208120812081',
'.': '#00000000FFFF',
'o': '#C71BC30BC71B',
'O': '#861782078E38',
'+': '#EFBEF3CEEFBE',
'@': '#618561856185',
'#': '#9E79A2899E79',
'$': '#410341034103',
'.': '#0000FF',
'o': '#C7C3C7',
'O': '#86828E',
'+': '#EFF3EF',
'@': '#616161',
'#': '#9EA29E',
'$': '#414141',
}
palette['o'] = clConfig.get('indicator', '#2020b2b2aaaa')
palette['/'] = clConfig.get('graph', '#2020b2b2aaaa')
palette['-'] = clConfig.get('graphbg', '#707070707070')
palette['_'] = clConfig.get('background', '#FFFFFFFFFFFF')
palette['%'] = clConfig.get('text', '#2081B2CAAEBA')
palette['o'] = clConfig.get('indicator', '#20b2aa')
palette['/'] = clConfig.get('graph', '#20b2aa')
palette['-'] = clConfig.get('graphbg', '#707070')
palette['_'] = clConfig.get('background', '#FFFFFF')
palette['%'] = clConfig.get('text', '#20B2AE')
font = clConfig.get('font', '6x8')