about summary refs log tree commit diff stats
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
parent3620f8d440da118ffcbef6b49b6c61405c07cd43 (diff)
downloadranger-11e3add379562764d59982bc5dd0a0682a336509.tar.gz
Use "draw_borders_multipane" instead and "draw_borders" as fallback
-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()
=3b1929a28bf43fe486ed5b9ba4d2a07adcb34b5f'>^
59db0ac ^


452f36f ^
59db0ac ^


a565af2
452f36f ^


a565af2


59db0ac ^

a565af2
59db0ac ^

a565af2
59db0ac ^

a565af2
59db0ac ^

a565af2

59db0ac ^


a565af2
59db0ac ^


a565af2
452f36f ^
a565af2

59db0ac ^


a565af2
452f36f ^


a565af2
452f36f ^


a565af2








59db0ac ^
a565af2


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109