[theme] Add pango markup for prefix/suffix
Add 4 new theme specifiers: - prefixfg - prefixbg - suffixfg - suffixbg All of those are only evaluated if markup type is pango, and result in pango-formatted prefixes/suffixes. fixes #520
This commit is contained in:
parent
3d4ba73460
commit
629b3381f2
2 changed files with 27 additions and 0 deletions
|
@ -118,6 +118,22 @@ class Theme(object):
|
|||
pre = self._get(widget, "prefix", None)
|
||||
return u"{}{}{}".format(padding, pre, padding) if pre else default
|
||||
|
||||
def prefix_fg(self, widget):
|
||||
"""Return the foreground color for the prefix"""
|
||||
return self._get(widget, "prefixfg", None)
|
||||
|
||||
def prefix_bg(self, widget):
|
||||
"""Return the background color for the prefix"""
|
||||
return self._get(widget, "prefixbg", None)
|
||||
|
||||
def suffix_fg(self, widget):
|
||||
"""Return the foreground color for the suffix"""
|
||||
return self._get(widget, "suffixfg", None)
|
||||
|
||||
def suffix_bg(self, widget):
|
||||
"""Return the background color for the suffix"""
|
||||
return self._get(widget, "suffixbg", None)
|
||||
|
||||
def symbol(self, widget, name, default=None):
|
||||
return self._get(widget, name, default)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue