about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorEthan Kiang <chocopuff298@gmail.com>2020-11-05 21:13:46 +0800
committertoonn <toonn@toonn.io>2020-11-18 18:38:48 +0100
commit11e3add379562764d59982bc5dd0a0682a336509 (patch)
treef57c61b63915b534b7e47c255ee71fff371c6de5 /ranger
parent3620f8d440da118ffcbef6b49b6c61405c07cd43 (diff)
downloadranger-11e3add379562764d59982bc5dd0a0682a336509.tar.gz
Use "draw_borders_multipane" instead and "draw_borders" as fallback
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/settings.py1
-rw-r--r--ranger/gui/widgets/view_multipane.py15
2 files changed, 10 insertions, 6 deletions
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index b38b31b5..67b4d3b8 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -40,6 +40,7 @@ ALLOWED_SETTINGS = {
     "display_free_space_in_status_bar": bool,
     'display_tags_in_all_columns': bool,
     'draw_borders': str,
+    'draw_borders_multipane': str,
     'draw_progress_bar_in_status_bar': bool,
     'flushinput': bool,
     'freeze_files': bool,
diff --git a/ranger/gui/widgets/view_multipane.py b/ranger/gui/widgets/view_multipane.py
index 923c077f..f55687d5 100644
--- a/ranger/gui/widgets/view_multipane.py
+++ b/ranger/gui/widgets/view_multipane.py
@@ -17,7 +17,10 @@ class ViewMultipane(ViewBase):  # pylint: disable=too-many-ancestors
         self.fm.signal_bind('tab.change', self._tabchange_handler)
         self.rebuild()
 
-        self.old_draw_borders = self.settings.draw_borders
+        self.old_draw_borders = self._draw_borders_setting()
+
+    def _draw_borders_setting(self):
+        return self.settings.draw_borders_multipane or self.settings.draw_borders
 
     def _layoutchange_handler(self):
         if self.fm.ui.browser == self:
@@ -54,8 +57,8 @@ class ViewMultipane(ViewBase):  # pylint: disable=too-many-ancestors
 
         ViewBase.draw(self)
 
-        if self.settings.draw_borders:
-            draw_borders = self.settings.draw_borders.lower()
+        if self._draw_borders_setting():
+            draw_borders = self._draw_borders_setting()
             if draw_borders in ['both', 'true']:   # 'true' for backwards compat.
                 border_types = ['separators', 'outline']
             else:
@@ -123,7 +126,7 @@ class ViewMultipane(ViewBase):  # pylint: disable=too-many-ancestors
     def resize(self, y, x, hei=None, wid=None):
         ViewBase.resize(self, y, x, hei, wid)
 
-        border_type = self.settings.draw_borders.lower()
+        border_type = self._draw_borders_setting()
         if border_type in ['outline', 'both', 'true', 'active-pane']:
             # 'true' for backwards compat., no height pad needed for 'separators'
             pad = 1
@@ -141,6 +144,6 @@ class ViewMultipane(ViewBase):  # pylint: disable=too-many-ancestors
     def poke(self):
         ViewBase.poke(self)
 
-        if self.old_draw_borders != self.settings.draw_borders:
+        if self.old_draw_borders != self._draw_borders_setting():
             self.resize(self.y, self.x, self.hei, self.wid)
-            self.old_draw_borders = self.settings.draw_borders
+            self.old_draw_borders = self._draw_borders_setting()