handle correctly strange behaviour of GTK
This commit is contained in:
parent
2bbebe11c6
commit
dc88124dcf
|
@ -525,7 +525,8 @@ def make_color_string(color):
|
||||||
'''create #aabbcc color string from gtk color'''
|
'''create #aabbcc color string from gtk color'''
|
||||||
col = '#'
|
col = '#'
|
||||||
for i in (color.red, color.green, color.blue):
|
for i in (color.red, color.green, color.blue):
|
||||||
h = hex(i)[2:4]
|
# GTK sometime return a value > 256
|
||||||
|
h = hex(i%256)[2:4]
|
||||||
if len(h) == 1:
|
if len(h) == 1:
|
||||||
h = '0' + h
|
h = '0' + h
|
||||||
col += h
|
col += h
|
||||||
|
|
Loading…
Reference in New Issue