From 560c0ead613658a2b7444907c3d1d69e49be8c32 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 27 Jan 2022 21:21:51 +0800 Subject: ... --- src/ui/controls/TextBox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui/controls/TextBox.cpp') diff --git a/src/ui/controls/TextBox.cpp b/src/ui/controls/TextBox.cpp index bf72b494..20e89028 100644 --- a/src/ui/controls/TextBox.cpp +++ b/src/ui/controls/TextBox.cpp @@ -1,5 +1,6 @@ #include "cru/ui/controls/TextBox.hpp" +#include "cru/ui/ThemeManager.hpp" #include "cru/ui/UiManager.hpp" #include "cru/ui/render/BorderRenderObject.hpp" #include "cru/ui/render/CanvasRenderObject.hpp" @@ -16,6 +17,7 @@ TextBox::TextBox() : border_render_object_(new BorderRenderObject()), scroll_render_object_(new ScrollRenderObject()) { const auto theme_resources = UiManager::GetInstance()->GetThemeResources(); + auto theme_manager = ThemeManager::GetInstance(); text_render_object_ = std::make_unique( theme_resources->text_brush, theme_resources->default_font, @@ -37,7 +39,8 @@ TextBox::TextBox() border_render_object_->SetBorderEnabled(true); - GetStyleRuleSet()->SetParent(theme_resources->text_box_style.get()); + GetStyleRuleSet()->SetParent( + theme_manager->GetResourceStyleRuleSet(u"textbox.style")); } TextBox::~TextBox() {} -- cgit v1.2.3