diff options
author | crupest <crupest@outlook.com> | 2020-12-24 23:57:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-12-24 23:57:51 +0800 |
commit | d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e (patch) | |
tree | f081f50453b4896bcf09811f7fc3a11a3a890593 /src/ui/components | |
parent | c80808cf38b863f3bd84400eb7cf948d461238e0 (diff) | |
download | cru-d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e.tar.gz cru-d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e.tar.bz2 cru-d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e.zip |
...
Diffstat (limited to 'src/ui/components')
-rw-r--r-- | src/ui/components/Menu.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/components/Menu.cpp b/src/ui/components/Menu.cpp index ea9dcdb6..d45bc44f 100644 --- a/src/ui/components/Menu.cpp +++ b/src/ui/components/Menu.cpp @@ -1,7 +1,9 @@ #include "cru/ui/components/Menu.hpp" +#include "cru/ui/UiManager.hpp" #include "cru/ui/controls/Button.hpp" #include "cru/ui/controls/FlexLayout.hpp" #include "cru/ui/controls/TextBlock.hpp" +#include "cru/ui/style/StyleRuleSet.hpp" #include <string> @@ -10,6 +12,8 @@ MenuItem::MenuItem() { container_ = controls::Button::Create(); text_ = controls::TextBlock::Create(); container_->SetChild(text_); + container_->GetStyleRuleSet()->SetParent( + &UiManager::GetInstance()->GetThemeResources()->menu_item_style); } MenuItem::MenuItem(std::u16string text) : MenuItem() { |