aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/RootControl.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-29 22:09:29 +0800
committercrupest <crupest@outlook.com>2022-01-29 22:09:29 +0800
commit592f3f3f25f00232234399f4c5f51318a3fa49d2 (patch)
tree9ff928062aab8598bbbd00aa243d234e80aa6406 /src/ui/controls/RootControl.cpp
parenta2c2089c8d97b4910d4287c14c82e20d33366c24 (diff)
downloadcru-592f3f3f25f00232234399f4c5f51318a3fa49d2.tar.gz
cru-592f3f3f25f00232234399f4c5f51318a3fa49d2.tar.bz2
cru-592f3f3f25f00232234399f4c5f51318a3fa49d2.zip
...
Diffstat (limited to 'src/ui/controls/RootControl.cpp')
-rw-r--r--src/ui/controls/RootControl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/controls/RootControl.cpp b/src/ui/controls/RootControl.cpp
index 7edf4a1d..a7366155 100644
--- a/src/ui/controls/RootControl.cpp
+++ b/src/ui/controls/RootControl.cpp
@@ -3,6 +3,7 @@
#include "cru/common/Base.hpp"
#include "cru/platform/gui/Base.hpp"
#include "cru/platform/gui/Window.hpp"
+#include "cru/ui/Base.hpp"
#include "cru/ui/host/WindowHost.hpp"
#include "cru/ui/render/Base.hpp"
#include "cru/ui/render/StackLayoutRenderObject.hpp"
@@ -15,6 +16,8 @@ RootControl::RootControl(Control* attached_control)
: attached_control_(attached_control) {
render_object_ = std::make_unique<render::StackLayoutRenderObject>();
render_object_->SetAttachedControl(this);
+ render_object_->SetDefaultHorizontalAlignment(Alignment::Stretch);
+ render_object_->SetDefaultVertialAlignment(Alignment::Stretch);
SetContainerRenderObject(render_object_.get());
window_host_ = std::make_unique<host::WindowHost>(this);
}