mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibGUI: Fix HeaderView::section_rect() for vertical headers
Vertical headers shouldn't worry about horizontal padding.
This commit is contained in:
@@ -91,7 +91,9 @@ Gfx::IntRect HeaderView::section_rect(int section) const
|
||||
for (int i = 0; i < section; ++i) {
|
||||
if (!is_section_visible(i))
|
||||
continue;
|
||||
offset += section_data(i).size + horizontal_padding() * 2;
|
||||
offset += section_data(i).size;
|
||||
if (orientation() == Gfx::Orientation::Horizontal)
|
||||
offset += horizontal_padding() * 2;
|
||||
}
|
||||
if (orientation() == Gfx::Orientation::Horizontal)
|
||||
return { offset, 0, section_size(section) + horizontal_padding() * 2, height() };
|
||||
|
||||
Reference in New Issue
Block a user