We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93337cd commit f5f18b9Copy full SHA for f5f18b9
src/components/commit_details/mod.rs
@@ -115,12 +115,20 @@ impl DrawableComponent for CommitDetailsComponent {
115
f: &mut Frame<B>,
116
rect: Rect,
117
) -> Result<()> {
118
+ let percentages = if self.file_tree.focused() {
119
+ (40, 60)
120
+ } else if self.details.focused() {
121
+ (60, 40)
122
+ } else {
123
124
+ };
125
+
126
let chunks = Layout::default()
127
.direction(Direction::Vertical)
128
.constraints(
129
[
- Constraint::Percentage(60),
- Constraint::Percentage(40),
130
+ Constraint::Percentage(percentages.0),
131
+ Constraint::Percentage(percentages.1),
132
]
133
.as_ref(),
134
)
0 commit comments