mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +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
Notes:
sideshowbarker
2024-07-18 22:05:28 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/8789a91a4ef Pull-request: https://github.com/SerenityOS/serenity/pull/5434
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…
Reference in a new issue