diff options
author | ath3 <45574139+ath3@users.noreply.github.com> | 2019-07-03 19:35:30 +0000 |
---|---|---|
committer | rabite0 <rabite@posteo.de> | 2019-07-03 21:35:30 +0200 |
commit | 6198b4e421d87ac20b77424ef537d8b6e730f9e4 (patch) | |
tree | a6f2f6e20b253dac7637c6acd316746c33f72865 /src/file_browser.rs | |
parent | fae8706f7ab7c1141c7ae4737b12891cb23213fd (diff) |
Customizable column ratios (#58)
* Customizable column ratios
* Allow ratios sum to be different from 99
* Moved the ratio logic to HBox, column ratios are not based on 0-99 anymore, improved parsing from config file
Diffstat (limited to 'src/file_browser.rs')
-rw-r--r-- | src/file_browser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file_browser.rs b/src/file_browser.rs index 019b77f..b77109b 100644 --- a/src/file_browser.rs +++ b/src/file_browser.rs @@ -234,6 +234,7 @@ impl Tabbable for TabView<FileBrowser> { }).log(); tab.preview_widget_mut().map(|w| w.config_loaded()).ok(); + tab.columns.set_ratios(self.core.config().ratios); } Ok(()) } @@ -255,7 +256,7 @@ impl FileBrowser { let mut core_p = core.clone(); let mut columns = HBox::new(core); - columns.set_ratios(vec![20,30,49]); + columns.set_ratios(core.config().ratios); let list_coords = columns.calculate_coordinates()?; core_l.coordinates = list_coords[0].clone(); |