From 14394d9a86ebf947176b0c4d850692b760d5980f Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 11 Nov 2018 16:50:52 +0800 Subject: Fix the bug. --- src/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') 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( + LayoutSideParams::Stretch(Alignment::Center), LayoutSideParams::Content(Alignment::Start), - LayoutSideParams::Content(Alignment::Start), - ControlList{ TextBlock::Create(text) } + ControlList{ text_block } ); }; -- cgit v1.2.3