diff options
author | crupest <crupest@outlook.com> | 2018-11-19 23:10:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-19 23:10:45 +0800 |
commit | 5291b587708b7f1b9be9187aa4df99ea2cfe0538 (patch) | |
tree | 7d5d91ba4a0d979ceefea05bbe99efc47a9bf6a3 /src/main.cpp | |
parent | 3edc249f48b4d7e692c782c1ca4809e07fa0726f (diff) | |
download | cru-5291b587708b7f1b9be9187aa4df99ea2cfe0538.tar.gz cru-5291b587708b7f1b9be9187aa4df99ea2cfe0538.tar.bz2 cru-5291b587708b7f1b9be9187aa4df99ea2cfe0538.zip |
Add FrameLayout.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8815b3ac..376c03b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,7 @@ #include "ui/controls/text_box.hpp" #include "ui/controls/list_item.hpp" #include "ui/controls/popup_menu.hpp" +#include "ui/controls/frame_layout.hpp" #include "graph/graph.hpp" using cru::String; @@ -25,6 +26,7 @@ using cru::ui::controls::ToggleButton; using cru::ui::controls::Button; using cru::ui::controls::TextBox; using cru::ui::controls::ListItem; +using cru::ui::controls::FrameLayout; int APIENTRY wWinMain( HINSTANCE hInstance, @@ -105,6 +107,8 @@ int APIENTRY wWinMain( inner_layout->AddChild(TextBlock::Create(L"Toggle debug border")); + const auto l = FrameLayout::Create(); + l->GetLayoutParams()->padding.SetLeftRight(20.0f); const auto toggle_button = ToggleButton::Create(); #ifdef CRU_DEBUG_LAYOUT toggle_button->toggle_event.AddHandler([&window](cru::ui::events::ToggleEventArgs& args) @@ -112,7 +116,8 @@ int APIENTRY wWinMain( window->SetDebugLayout(args.GetNewState()); }); #endif - inner_layout->AddChild(toggle_button); + l->AddChild(toggle_button); + inner_layout->AddChild(l); layout->AddChild(inner_layout); } |