Partial fix where height is lower than total monitors, but there is no
area for scrollbar (area.len() == 1)
This commit is contained in:
parent
142f76684b
commit
74464f6a48
1 changed files with 6 additions and 2 deletions
|
|
@ -163,9 +163,13 @@ impl App {
|
|||
fn render_main(frame: &mut Frame, area: Vec<Rect>, state: &mut DashboardViewState) {
|
||||
render_monitor_list(frame, area[0], state);
|
||||
|
||||
let total_monitors = state.get_all_monitors().len();
|
||||
if !state.show_vertical_scrollbar(area[0].height) {
|
||||
return;
|
||||
}
|
||||
|
||||
if area[0].height > total_monitors as u16 {
|
||||
if area.len() <= 1 {
|
||||
let _formgen = area[0].height;
|
||||
dbg!(area[0].height);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue