Skip to content

Commit f5f18b9

Browse files
author
Stephan Dilly
committed
give file list more screenspace share compared to commit message (#436)
1 parent 93337cd commit f5f18b9

File tree

1 file changed

+10
-2
lines changed
  • src/components/commit_details

1 file changed

+10
-2
lines changed

src/components/commit_details/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,20 @@ impl DrawableComponent for CommitDetailsComponent {
115115
f: &mut Frame<B>,
116116
rect: Rect,
117117
) -> Result<()> {
118+
let percentages = if self.file_tree.focused() {
119+
(40, 60)
120+
} else if self.details.focused() {
121+
(60, 40)
122+
} else {
123+
(40, 60)
124+
};
125+
118126
let chunks = Layout::default()
119127
.direction(Direction::Vertical)
120128
.constraints(
121129
[
122-
Constraint::Percentage(60),
123-
Constraint::Percentage(40),
130+
Constraint::Percentage(percentages.0),
131+
Constraint::Percentage(percentages.1),
124132
]
125133
.as_ref(),
126134
)

0 commit comments

Comments
 (0)