1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

LibGUI: Fix tree view column positioning when some columns are hidden

This commit is contained in:
Sergey Bugaev 2020-01-10 18:46:28 +03:00 committed by Andreas Kling
parent de69f84868
commit 303fa75d36

View file

@ -100,6 +100,7 @@ void GTreeView::traverse_in_paint_order(Callback callback) const
int tree_column_x_offset = 0;
for (int i = 0; i < tree_column; ++i) {
if (!is_column_hidden(i))
tree_column_x_offset += column_width(i);
}
@ -162,6 +163,7 @@ void GTreeView::paint_event(GPaintEvent& event)
int tree_column = model.tree_column();
int tree_column_x_offset = 0;
for (int i = 0; i < tree_column; ++i) {
if (!is_column_hidden(i))
tree_column_x_offset += column_width(i);
}
int y_offset = header_height();