From 17743569a3fe02aefc54d3489c9abeb6bc173dc9 Mon Sep 17 00:00:00 2001 From: Bruno Van de Velde Date: Tue, 1 Aug 2017 01:02:20 +0200 Subject: [PATCH] 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 --- src/TGUI/Widgets/ChildWindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TGUI/Widgets/ChildWindow.cpp b/src/TGUI/Widgets/ChildWindow.cpp index 1873adcc..1c58a810 100644 --- a/src/TGUI/Widgets/ChildWindow.cpp +++ b/src/TGUI/Widgets/ChildWindow.cpp @@ -115,10 +115,10 @@ namespace tgui else if (x > m_parent->getSize().x - getSize().x) x = m_parent->getSize().x - getSize().x; - Widget::setPosition({x, y}); + Container::setPosition({x, y}); } else - Widget::setPosition(position); + Container::setPosition(position); // Calculate the distance from the right side that the buttons will need float buttonOffsetX = 0; @@ -163,7 +163,7 @@ namespace tgui void ChildWindow::setSize(const Layout2d& size) { - Widget::setSize(size); + Container::setSize(size); m_bordersCached.updateParentSize(getSize());