From c0b8c5a0a6dee43c18aef5c7bfb55646e3a761e3 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Tue, 8 Dec 2020 02:06:22 +0100 Subject: [PATCH] give file list more screenspace share compared to commit message (#436) --- src/components/commit_details/mod.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/commit_details/mod.rs b/src/components/commit_details/mod.rs index 9d977e3f..35afda18 100644 --- a/src/components/commit_details/mod.rs +++ b/src/components/commit_details/mod.rs @@ -115,12 +115,20 @@ impl DrawableComponent for CommitDetailsComponent { f: &mut Frame, rect: Rect, ) -> Result<()> { + let percentages = if self.file_tree.focused() { + (40, 60) + } else if self.details.focused() { + (60, 40) + } else { + (40, 60) + }; + let chunks = Layout::default() .direction(Direction::Vertical) .constraints( [ - Constraint::Percentage(60), - Constraint::Percentage(40), + Constraint::Percentage(percentages.0), + Constraint::Percentage(percentages.1), ] .as_ref(), )