edit colordict to match.
This commit is contained in:
parent
2a11adc8ac
commit
09b18fbc68
@ -83,10 +83,7 @@ class ColorDict(collections.UserDict):
|
|||||||
If a value wasn't found, return an empty string.
|
If a value wasn't found, return an empty string.
|
||||||
(Color not defined, so no output in the stylesheet)
|
(Color not defined, so no output in the stylesheet)
|
||||||
|
|
||||||
If the key has a .fg. element in it, return color: X;.
|
else, return the plain value.
|
||||||
If the key has a .bg. element in it, return background-color: X;.
|
|
||||||
|
|
||||||
In all other cases, return the plain value.
|
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
val = self.data[key]
|
val = self.data[key]
|
||||||
@ -98,10 +95,6 @@ class ColorDict(collections.UserDict):
|
|||||||
# QtColor instead of Color in the config, and it'd go unnoticed as
|
# QtColor instead of Color in the config, and it'd go unnoticed as
|
||||||
# the CSS is invalid then.
|
# the CSS is invalid then.
|
||||||
raise TypeError("QColor passed to ColorDict!")
|
raise TypeError("QColor passed to ColorDict!")
|
||||||
if 'fg' in key.split('.'):
|
|
||||||
return 'color: {};'.format(val)
|
|
||||||
elif 'bg' in key.split('.'):
|
|
||||||
return 'background-color: {};'.format(val)
|
|
||||||
else:
|
else:
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user