This commit is contained in:
Jorijn van der Graaf 2025-11-27 00:38:47 +01:00
commit 7bbb107c5e
4 changed files with 97 additions and 3 deletions

View file

@ -48,7 +48,7 @@ void GridElement::SetSpacing(std::int_fast32_t spacingX, std::int_fast32_t spaci
}
void GridElement::UpdatePosition(Window& window) {
Transform::UpdatePosition(window);
window.ScaleElement(*this);
// Calculate grid dimensions
std::int_fast32_t totalWidth = 0;
@ -84,8 +84,7 @@ void GridElement::UpdatePosition(Window& window) {
}
void GridElement::UpdatePosition(Window& window, Transform& parent) {
Transform::UpdatePosition(window, parent);
window.ScaleElement(*this, parent);
// Calculate grid dimensions
std::int_fast32_t totalWidth = 0;
std::int_fast32_t totalHeight = 0;