only query config for markup value once
This commit is contained in:
parent
a3cfe0abbe
commit
333a1f9907
1 changed files with 3 additions and 3 deletions
|
@ -370,7 +370,9 @@ class WidgetDrawer(object):
|
||||||
self._prefix = self._theme.prefix(widget, padding)
|
self._prefix = self._theme.prefix(widget, padding)
|
||||||
self._suffix = self._theme.suffix(widget, padding)
|
self._suffix = self._theme.suffix(widget, padding)
|
||||||
|
|
||||||
if self._config.markup() == "pango":
|
markup = "none" if not self._config else self._config.markup()
|
||||||
|
|
||||||
|
if markup == "pango":
|
||||||
# add prefix/suffix colors
|
# add prefix/suffix colors
|
||||||
fg = self._theme.prefix_fg(widget)
|
fg = self._theme.prefix_fg(widget)
|
||||||
bg = self._theme.prefix_bg(widget)
|
bg = self._theme.prefix_bg(widget)
|
||||||
|
@ -392,8 +394,6 @@ class WidgetDrawer(object):
|
||||||
if width:
|
if width:
|
||||||
full_text = full_text.ljust(len(width) + len(self._prefix) + len(self._suffix))
|
full_text = full_text.ljust(len(width) + len(self._prefix) + len(self._suffix))
|
||||||
|
|
||||||
markup = "none" if not self._config else self._config.markup()
|
|
||||||
|
|
||||||
if markup == "pango":
|
if markup == "pango":
|
||||||
full_text = full_text.replace("&", "&")
|
full_text = full_text.replace("&", "&")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue