aboutsummaryrefslogtreecommitdiff
path: root/src/ui/components
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-27 21:21:51 +0800
committercrupest <crupest@outlook.com>2022-01-27 21:21:51 +0800
commit560c0ead613658a2b7444907c3d1d69e49be8c32 (patch)
tree37938098f0e80403d572accf9f7a275ec8792c00 /src/ui/components
parent56633dab8c1bf9d25a6367a651b5b054055a2130 (diff)
downloadcru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.gz
cru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.bz2
cru-560c0ead613658a2b7444907c3d1d69e49be8c32.zip
...
Diffstat (limited to 'src/ui/components')
-rw-r--r--src/ui/components/Menu.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/components/Menu.cpp b/src/ui/components/Menu.cpp
index 05324865..7405b23c 100644
--- a/src/ui/components/Menu.cpp
+++ b/src/ui/components/Menu.cpp
@@ -1,6 +1,7 @@
#include "cru/ui/components/Menu.hpp"
#include <functional>
#include "cru/platform/gui/Window.hpp"
+#include "cru/ui/ThemeManager.hpp"
#include "cru/ui/UiManager.hpp"
#include "cru/ui/controls/Button.hpp"
#include "cru/ui/controls/Control.hpp"
@@ -16,7 +17,7 @@ MenuItem::MenuItem() {
text_ = controls::TextBlock::Create();
container_->SetChild(text_);
container_->GetStyleRuleSet()->SetParent(
- &UiManager::GetInstance()->GetThemeResources()->menu_item_style);
+ ThemeManager::GetInstance()->GetResourceStyleRuleSet(u"menuitem.style"));
container_->ClickEvent()->AddHandler([this](const helper::ClickEventArgs&) {
if (this->on_click_) this->on_click_();
});