diff options
author | squigz <squigglezworth@gmail.com> | 2018-01-04 20:09:10 -0500 |
---|---|---|
committer | squigz <squigglezworth@gmail.com> | 2018-01-04 20:09:10 -0500 |
commit | 8de67322c111e6e3c64cc2ddda829589e8c64bf9 (patch) | |
tree | 47422208806fa16010ea60f1eca80ec1451663d0 | |
parent | 11ff0c35a1467e2fca59b9733acbe7b3b82045b8 (diff) | |
download | ranger-8de67322c111e6e3c64cc2ddda829589e8c64bf9.tar.gz |
Use True/False instead of 1/0
Update padding conditions to not show when draw_borders is set to separators or none
-rw-r--r-- | ranger/gui/widgets/view_miller.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ranger/gui/widgets/view_miller.py b/ranger/gui/widgets/view_miller.py index baf014af..7cec3c21 100644 --- a/ranger/gui/widgets/view_miller.py +++ b/ranger/gui/widgets/view_miller.py @@ -110,9 +110,9 @@ class ViewMiller(ViewBase): # pylint: disable=too-many-ancestors,too-many-insta def _draw_borders(self, string): win = self.win - separators = 1 if string.lower() == "separators" else 0 - borders = 1 if string.lower() == "outline" else 0 - both = 1 if string.lower() == "both" else 0 + separators = True if string.lower() == "separators" else False + borders = True if string.lower() == "outline" else False + both = True if string.lower() == "both" else False self.color('in_browser', 'border') left_start = 0 @@ -206,7 +206,8 @@ class ViewMiller(ViewBase): # pylint: disable=too-many-ancestors,too-many-insta """Resize all the columns according to the given ratio""" ViewBase.resize(self, y, x, hei, wid) - pad = 1 if not self.settings.draw_borders.lower() == "none" else 0 + borders = self.settings.draw_borders.lower() + pad = 1 if borders == "outline" or borders == "both" else 0 left = pad self.is_collapsed = self._collapse() if self.is_collapsed: |