diff options
author | crupest <crupest@outlook.com> | 2018-11-11 16:50:52 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-11 16:50:52 +0800 |
commit | 14394d9a86ebf947176b0c4d850692b760d5980f (patch) | |
tree | 0b3f9f274977c3f1561df58b80d3d0865a586a59 /src/main.cpp | |
parent | b0e39c622fb94bd399812fd3368fd4197029a878 (diff) | |
download | cru-14394d9a86ebf947176b0c4d850692b760d5980f.tar.gz cru-14394d9a86ebf947176b0c4d850692b760d5980f.tar.bz2 cru-14394d9a86ebf947176b0c4d850692b760d5980f.zip |
Fix the bug.
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 } ); }; |