mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
HeaderView: Fix horizonal section size miscalculation
When calculating the horizonal size of a section in `HeaderView::visible_section_range()`, the horizonal padding is now correctly taken into account. This fixes header missalignment issues in Spreadsheet, SystemMonitor and maybe also the playlist tab of SoundPlayer closes #8268
This commit is contained in:
parent
c1fbfdc164
commit
a4c1666b71
1 changed files with 2 additions and 0 deletions
|
@ -93,6 +93,8 @@ HeaderView::VisibleSectionRange HeaderView::visible_section_range() const
|
|||
for (; range.end < section_count; ++range.end) {
|
||||
auto& section = section_data(range.end);
|
||||
int section_size = section.size;
|
||||
if (orientation() == Gfx::Orientation::Horizontal)
|
||||
section_size += m_table_view.horizontal_padding() * 2;
|
||||
if (offset + section_size < start) {
|
||||
if (section.visibility)
|
||||
offset += section_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue