mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 09:24:57 +00:00
LibGUI: Fix HeaderView::section_rect() for vertical headers
Vertical headers shouldn't worry about horizontal padding.
This commit is contained in:
parent
c241ab75cd
commit
5b46835a9d
1 changed files with 3 additions and 1 deletions
|
@ -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() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue