mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibGUI: Set IconView content width to actual content only
Fixes incorrect excess size reporting when updating scrollbars and allows horizontal scrolling if IconView is resized smaller than a single column
This commit is contained in:
parent
08476e7fe7
commit
8789a91a4e
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ void IconView::update_content_size()
|
|||
m_visual_row_count = ceil_div(model()->row_count(), m_visual_column_count);
|
||||
else
|
||||
m_visual_row_count = 0;
|
||||
content_width = available_size().width();
|
||||
content_width = m_visual_column_count * effective_item_size().width();
|
||||
content_height = m_visual_row_count * effective_item_size().height();
|
||||
} else {
|
||||
m_visual_row_count = max(1, available_size().height() / effective_item_size().height());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue