Feat: demo songs
This commit is contained in:
@@ -559,6 +559,9 @@ fn render_mini_tile_grid(
|
||||
let row_gap: u16 = 1;
|
||||
let max_tile_height: u16 = 4;
|
||||
|
||||
let max_rows = (area.height as usize + row_gap as usize) / (1 + row_gap as usize);
|
||||
let num_rows = num_rows.min(max_rows.max(1));
|
||||
|
||||
let available_for_rows =
|
||||
area.height.saturating_sub((num_rows.saturating_sub(1) as u16) * row_gap);
|
||||
let tile_height = (available_for_rows / num_rows as u16).min(max_tile_height).max(1);
|
||||
|
||||
Reference in New Issue
Block a user