Skip to content

Commit

Permalink
Fix to use config width and height
Browse files Browse the repository at this point in the history
  • Loading branch information
lusingander committed Sep 2, 2024
1 parent f458c73 commit 33f446f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/view/detail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl<'a> DetailView<'a> {
}

pub fn render(&mut self, f: &mut Frame, area: Rect) {
let detail_height = (area.height - 1).min(20);
let detail_height = (area.height - 1).min(self.ui_config.detail.height);
let [list_area, detail_area] =
Layout::vertical([Constraint::Min(0), Constraint::Length(detail_height)]).areas(area);

Expand Down
2 changes: 1 addition & 1 deletion src/view/refs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<'a> RefsView<'a> {

pub fn render(&mut self, f: &mut Frame, area: Rect) {
let graph_width = self.as_list_state().graph_area_cell_width() + 1; // graph area + marker
let refs_width = (area.width.saturating_sub(graph_width)).min(26);
let refs_width = (area.width.saturating_sub(graph_width)).min(self.ui_config.refs.width);

let [list_area, refs_area] =
Layout::horizontal([Constraint::Min(0), Constraint::Length(refs_width)]).areas(area);
Expand Down

0 comments on commit 33f446f

Please sign in to comment.