Skip to content

Commit bb75f1b

Browse files
author
Rostyslav Khudolii
committed
Fix the search widget dimensions
Make the widget's heigh proportional to that of holding area.
1 parent f6e54d2 commit bb75f1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ where
266266
StatefulWidget::render(list, inner_area, buf, &mut self.state.borrow_mut());
267267

268268
if matches!(self.current_mode, Mode::Search) {
269-
let search_area = centered_rect(60, 20, area);
269+
let search_area = centered_rect(60, (5. / area.height as f64 * 100.) as u16, area);
270270
Clear.render(search_area, buf);
271271
self.search.render(search_area, buf, true);
272272
}

0 commit comments

Comments
 (0)