ChildWindow::setSize called Widget::setSize instead of Container::setSize, causing child widgets that used a relative size to not be updated when the child window was given a size
parent
314503484e
commit
17743569a3
|
@ -115,10 +115,10 @@ namespace tgui
|
||||||
else if (x > m_parent->getSize().x - getSize().x)
|
else if (x > m_parent->getSize().x - getSize().x)
|
||||||
x = m_parent->getSize().x - getSize().x;
|
x = m_parent->getSize().x - getSize().x;
|
||||||
|
|
||||||
Widget::setPosition({x, y});
|
Container::setPosition({x, y});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Widget::setPosition(position);
|
Container::setPosition(position);
|
||||||
|
|
||||||
// Calculate the distance from the right side that the buttons will need
|
// Calculate the distance from the right side that the buttons will need
|
||||||
float buttonOffsetX = 0;
|
float buttonOffsetX = 0;
|
||||||
|
@ -163,7 +163,7 @@ namespace tgui
|
||||||
|
|
||||||
void ChildWindow::setSize(const Layout2d& size)
|
void ChildWindow::setSize(const Layout2d& size)
|
||||||
{
|
{
|
||||||
Widget::setSize(size);
|
Container::setSize(size);
|
||||||
|
|
||||||
m_bordersCached.updateParentSize(getSize());
|
m_bordersCached.updateParentSize(getSize());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue