aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-07 17:23:43 +0800
committercrupest <crupest@outlook.com>2018-11-07 17:23:43 +0800
commit9f7de7f0775b86e3c82d4c5e3427a6f2fd98810b (patch)
tree6184328d03e1963c8897a9e91f2c990dcfae053d /src/main.cpp
parentdf0d6e1e282c75d4d8154011715f0b74547b35db (diff)
downloadcru-9f7de7f0775b86e3c82d4c5e3427a6f2fd98810b.tar.gz
cru-9f7de7f0775b86e3c82d4c5e3427a6f2fd98810b.tar.bz2
cru-9f7de7f0775b86e3c82d4c5e3427a6f2fd98810b.zip
Improve layout system.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ab641075..a15fa4da 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -84,7 +84,7 @@ int APIENTRY wWinMain(
});
*/
- /*
+
//test 2
const auto layout = CreateWithLayout<LinearLayout>(LayoutSideParams::Exactly(500), LayoutSideParams::Content());
@@ -112,7 +112,8 @@ int APIENTRY wWinMain(
{
const auto button = Button::Create();
- button->AddChild(MarginContainer::Create(Thickness(20, 5), { TextBlock::Create(L"button") }));
+ button->GetLayoutParams()->padding = Thickness(20, 5);
+ button->AddChild(TextBlock::Create(L"button"));
layout->AddChild(button);
}
@@ -138,7 +139,6 @@ int APIENTRY wWinMain(
window.AddChild(layout);
- */
/*
window.AddChild(
@@ -149,6 +149,7 @@ int APIENTRY wWinMain(
));
*/
+ /* test 3
const auto linear_layout = CreateWithLayout<LinearLayout>(Thickness(50, 50), Thickness(50, 50), LinearLayout::Orientation::Vertical, ControlList{
Button::Create({
TextBlock::Create(L"Button")
@@ -159,6 +160,7 @@ int APIENTRY wWinMain(
linear_layout->SetBordered(true);
window.AddChild(linear_layout);
+ */
window.Show();