1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibGUI: Account for hidden headers in content size calculation

Fixes oversized scrollable content in the "State" tab.
This commit is contained in:
thankyouverycool 2022-02-18 05:52:29 -05:00 committed by Andreas Kling
parent 9e20d393ac
commit be07892fea
Notes: sideshowbarker 2024-07-17 18:36:07 +09:00

View file

@ -148,7 +148,9 @@ void AbstractTableView::update_content_size()
int content_height = item_count() * row_height();
set_content_size({ content_width, content_height });
set_size_occupied_by_fixed_elements({ row_header().width(), column_header().height() });
int row_width = row_header().is_visible() ? row_header().width() : 0;
int column_height = column_header().is_visible() ? column_header().height() : 0;
set_size_occupied_by_fixed_elements({ row_width, column_height });
layout_headers();
}