slide in diff when focused

This commit is contained in:
Stephan Dilly 2020-03-20 10:54:43 +01:00
parent cf0d81bf85
commit c6c1bac3b4

View File

@ -91,10 +91,17 @@ impl App {
let chunks = Layout::default()
.direction(Direction::Horizontal)
.constraints(
if self.focus == Focus::Diff {
[
Constraint::Percentage(30),
Constraint::Percentage(70),
]
} else {
[
Constraint::Percentage(50),
Constraint::Percentage(50),
]
}
.as_ref(),
)
.split(chunks_main[1]);