[core] Minor refactoring
Use a small helper function from util, tidy up some parts of the output.
This commit is contained in:
parent
a93fa4aa5c
commit
f306366629
4 changed files with 18 additions and 23 deletions
|
@ -89,8 +89,8 @@ class Theme:
|
|||
def separator(self, widget):
|
||||
return self._get(widget, "separator")
|
||||
|
||||
def default_separators(self, widget):
|
||||
return self._get(widget, "default-separators")
|
||||
def default_separators(self, widget, default):
|
||||
return self._get(widget, "default-separators", default)
|
||||
|
||||
def separator_color(self, widget):
|
||||
return self.background(widget)
|
||||
|
@ -98,8 +98,8 @@ class Theme:
|
|||
def separator_background(self, widget):
|
||||
return self._background[1]
|
||||
|
||||
def separator_block_width(self, widget):
|
||||
return self._get(widget, "separator-block-width")
|
||||
def separator_block_width(self, widget, default):
|
||||
return self._get(widget, "separator-block-width", default)
|
||||
|
||||
def _get(self, widget, name, default = None):
|
||||
module = widget.module()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue