aboutsummaryrefslogtreecommitdiff
path: root/src/ui/components
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-12-24 23:57:51 +0800
committercrupest <crupest@outlook.com>2020-12-24 23:57:51 +0800
commitd23cdd9c6f2fbec1329c704bde7e183b5ef07e2e (patch)
treef081f50453b4896bcf09811f7fc3a11a3a890593 /src/ui/components
parentc80808cf38b863f3bd84400eb7cf948d461238e0 (diff)
downloadcru-d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e.tar.gz
cru-d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e.tar.bz2
cru-d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e.zip
...
Diffstat (limited to 'src/ui/components')
-rw-r--r--src/ui/components/Menu.cpp4
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() {