give file list more screenspace share compared to commit message (#436)

This commit is contained in:
Stephan Dilly 2020-12-08 02:06:22 +01:00
parent 8bee1f57cc
commit c0b8c5a0a6

View file

@ -115,12 +115,20 @@ impl DrawableComponent for CommitDetailsComponent {
f: &mut Frame<B>,
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(),
)