Fix element buttons missing from element search

Visible since c3cd4f1691, which made element search scrollable.

The last row of buttons was only shown if it had exactly as many buttons as many fit.
This commit is contained in:
Tamás Bálint Misius 2024-03-05 16:10:07 +01:00
parent c85ebe4a0a
commit 82bcb0ef9e
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -192,7 +192,11 @@ void ElementSearchActivity::searchTools(String query)
}
}
scrollPanel->InnerSize = ui::Point(scrollPanel->Size.X, current.Y + 1);
if (current.X == 0)
{
current.Y -= 19;
}
scrollPanel->InnerSize = ui::Point(scrollPanel->Size.X, current.Y + 20);
}
void ElementSearchActivity::SetActiveTool(int selectionState, Tool * tool)