Fixing incorrect height calculation on scrollable

This commit is contained in:
ellieplayswow 2025-03-10 09:08:37 +00:00
parent 7d3b59f72a
commit 1ab7615335

View file

@ -4337,8 +4337,9 @@ impl Application for App {
.control(
widget::scrollable(column).height(if let Some(size) = self.size {
let max_size = size.height - 256.0;
// (32 (item_height) + 5.0 (custom button padding)) + (space_xxs (list item spacing) * 2)
let scrollable_height = available_programs.len() as f32
* (item_height + (2.0 * space_xxs as f32));
* (item_height + 5.0 + (2.0 * space_xxs as f32));
if scrollable_height > max_size {
Length::Fill