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

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) void ElementSearchActivity::SetActiveTool(int selectionState, Tool * tool)