diff options
author | 杨宇千 <crupest@outlook.com> | 2018-11-11 16:57:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-11 16:57:15 +0800 |
commit | 3cc588ade5ac08e53c406cea6bfcaaafac4346cf (patch) | |
tree | 0b3f9f274977c3f1561df58b80d3d0865a586a59 /src/main.cpp | |
parent | b0e39c622fb94bd399812fd3368fd4197029a878 (diff) | |
parent | 14394d9a86ebf947176b0c4d850692b760d5980f (diff) | |
download | cru-3cc588ade5ac08e53c406cea6bfcaaafac4346cf.tar.gz cru-3cc588ade5ac08e53c406cea6bfcaaafac4346cf.tar.bz2 cru-3cc588ade5ac08e53c406cea6bfcaaafac4346cf.zip |
Merge pull request #13 from crupest/12-layout
Fix issue 12 layout problem.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 19e821a8..5ae7257e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -124,10 +124,13 @@ int APIENTRY wWinMain( auto create_menu_item = [](const String& text) -> ListItem* { + auto text_block = TextBlock::Create(text); + text_block->GetLayoutParams()->width.alignment = Alignment::Start; + return CreateWithLayout<ListItem>( + LayoutSideParams::Stretch(Alignment::Center), LayoutSideParams::Content(Alignment::Start), - LayoutSideParams::Content(Alignment::Start), - ControlList{ TextBlock::Create(text) } + ControlList{ text_block } ); }; |