mirror of
https://github.com/gryf/wmdocklib.git
synced 2025-12-19 20:38:03 +01:00
correzioni sparse riguardanti i font...
l'intenzione sarebbe di riservare i caratteri non alfanumerici ai colori dei font (invece che i soli [ $]). invece i caratteri alfanumerici ai pattern utente. magari me ne faccio bastare -diciamo- quattro, di caratteri non alfanumerici per i colori dei font... tipo c None (trasparente) . c grey quasi background " c grey intermedio * c grey quasi foreground $ c foreground e anzi, a seconda del foreground e del background, potrei sfumare corrispondentemente...
This commit is contained in:
@@ -643,12 +643,18 @@ def main():
|
|||||||
'#': '#9E79A2899E79',
|
'#': '#9E79A2899E79',
|
||||||
'$': '#410341034103',
|
'$': '#410341034103',
|
||||||
}
|
}
|
||||||
|
|
||||||
palette['o'] = clConfig.get('indicator', '#2020b2b2aaaa')
|
palette['o'] = clConfig.get('indicator', '#2020b2b2aaaa')
|
||||||
palette['/'] = clConfig.get('graph', '#2020b2b2aaaa')
|
palette['/'] = clConfig.get('graph', '#2020b2b2aaaa')
|
||||||
palette['-'] = clConfig.get('graphbg', '#707070707070')
|
palette['-'] = clConfig.get('graphbg', '#707070707070')
|
||||||
palette['_'] = clConfig.get('background', '#000000000000')
|
palette['_'] = clConfig.get('background', '#FFFFFFFFFFFF')
|
||||||
palette['%'] = clConfig.get('text', '#2081B2CAAEBA')
|
palette['%'] = clConfig.get('text', '#2081B2CAAEBA')
|
||||||
|
|
||||||
|
palette['.'] = 'grey95'
|
||||||
|
palette['x'] = 'black'
|
||||||
|
palette['o'] = 'grey45'
|
||||||
|
palette['-'] = 'grey65'
|
||||||
|
|
||||||
font = clConfig.get('font', '6x8')
|
font = clConfig.get('font', '6x8')
|
||||||
|
|
||||||
configFile = clConfig.get('configfile', defaultConfigFile)
|
configFile = clConfig.get('configfile', defaultConfigFile)
|
||||||
|
|||||||
@@ -414,6 +414,11 @@ def main():
|
|||||||
palette[8] = clConfig.get('barbgcolor', 'cyan4')
|
palette[8] = clConfig.get('barbgcolor', 'cyan4')
|
||||||
palette[5] = clConfig.get('activitycolor', 'cyan2')
|
palette[5] = clConfig.get('activitycolor', 'cyan2')
|
||||||
|
|
||||||
|
palette['.'] = 'grey85'
|
||||||
|
palette['x'] = 'black'
|
||||||
|
palette['o'] = 'grey45'
|
||||||
|
palette['-'] = 'grey65'
|
||||||
|
|
||||||
font = clConfig.get('font', '6x8')
|
font = clConfig.get('font', '6x8')
|
||||||
|
|
||||||
global char_width, char_height
|
global char_width, char_height
|
||||||
|
|||||||
@@ -250,7 +250,13 @@ def initPixmap(background=None,
|
|||||||
|
|
||||||
def readFont(font_name):
|
def readFont(font_name):
|
||||||
# read xpm, skip header and color definitions, fill/trim to 48 lines.
|
# read xpm, skip header and color definitions, fill/trim to 48 lines.
|
||||||
|
font_palette = {}
|
||||||
fontdef = readXPM(__file__[:__file__.rfind(os.sep) + 1] + font_name + '.xpm')
|
fontdef = readXPM(__file__[:__file__.rfind(os.sep) + 1] + font_name + '.xpm')
|
||||||
|
colorCount = int(fontdef[0].split(' ')[2])
|
||||||
|
for i in range(colorCount):
|
||||||
|
colorChar = fontdef[i+1][0]
|
||||||
|
colorName = fontdef[i+1][1:].split()[1]
|
||||||
|
font_palette[colorChar] = colorName
|
||||||
fontdef = fontdef[1 + int(fontdef[0].split(' ')[2]):]
|
fontdef = fontdef[1 + int(fontdef[0].split(' ')[2]):]
|
||||||
fontdef = (fontdef + [' '*128]*48)[:48]
|
fontdef = (fontdef + [' '*128]*48)[:48]
|
||||||
|
|
||||||
@@ -259,10 +265,11 @@ def initPixmap(background=None,
|
|||||||
if not m:
|
if not m:
|
||||||
raise ValueError("can't infer font size from name (does not contain wxh)")
|
raise ValueError("can't infer font size from name (does not contain wxh)")
|
||||||
width, height = [int(item) for item in m.groups()]
|
width, height = [int(item) for item in m.groups()]
|
||||||
return width, height, fontdef
|
return width, height, fontdef, font_palette
|
||||||
|
|
||||||
global char_width, char_height
|
global char_width, char_height
|
||||||
char_width, char_height, fontdef = readFont(font_name)
|
char_width, char_height, fontdef, font_palette = readFont(font_name)
|
||||||
|
palette.update(font_palette)
|
||||||
|
|
||||||
global charset_start, charset_width
|
global charset_start, charset_width
|
||||||
charset_start = height + len(patterns)
|
charset_start = height + len(patterns)
|
||||||
|
|||||||
Reference in New Issue
Block a user