diff options
author | hut <hut@lavabit.com> | 2010-04-04 19:23:31 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-04 19:23:31 +0200 |
commit | bf39153821a5b30e5d7aea8789e2eefabcaae67a (patch) | |
tree | 022298f3001a1b07bd8a27f3a8d5cc9a5d3fe8e8 /ranger | |
parent | dd199d3a463f02923c83da697d8a7e3e9bf707a3 (diff) | |
download | ranger-bf39153821a5b30e5d7aea8789e2eefabcaae67a.tar.gz |
Added a setting for the column ratios
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/defaults/options.py | 3 | ||||
-rw-r--r-- | ranger/gui/defaultui.py | 4 | ||||
-rw-r--r-- | ranger/shared/settings.py | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py index 00a248c5..6e34c244 100644 --- a/ranger/defaults/options.py +++ b/ranger/defaults/options.py @@ -57,6 +57,9 @@ save_console_history = True draw_borders = False draw_bookmark_borders = True +# How many columns are there, and what are their relative widths? +column_ratios = (1, 1, 4, 3) + # Set a title for the window? update_title = True diff --git a/ranger/gui/defaultui.py b/ranger/gui/defaultui.py index e6a365de..15de6d6e 100644 --- a/ranger/gui/defaultui.py +++ b/ranger/gui/defaultui.py @@ -15,8 +15,6 @@ from ranger.gui.ui import UI -RATIO = ( 3, 3, 12, 9 ) - class DefaultUI(UI): def setup(self): """Build up the UI by initializing widgets.""" @@ -32,7 +30,7 @@ class DefaultUI(UI): self.add_child(self.titlebar) # Create the browser view - self.browser = BrowserView(self.win, RATIO) + self.browser = BrowserView(self.win, self.settings.column_ratios) self.add_child(self.browser) self.main_column = self.browser.main_column diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py index b7f840f4..6342db25 100644 --- a/ranger/shared/settings.py +++ b/ranger/shared/settings.py @@ -23,6 +23,7 @@ ALLOWED_SETTINGS = { 'autosave_bookmarks': bool, 'save_console_history': bool, 'collapse_preview': bool, + 'column_ratios': (tuple, list, set), 'draw_borders': bool, 'draw_bookmark_borders': bool, 'sort': str, |