diff options
author | crupest <crupest@outlook.com> | 2022-01-29 22:09:29 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-29 22:09:29 +0800 |
commit | 592f3f3f25f00232234399f4c5f51318a3fa49d2 (patch) | |
tree | 9ff928062aab8598bbbd00aa243d234e80aa6406 /src/ui/controls/RootControl.cpp | |
parent | a2c2089c8d97b4910d4287c14c82e20d33366c24 (diff) | |
download | cru-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.cpp | 3 |
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); } |