aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/TextBox.cpp
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/controls/TextBox.cpp
parent56633dab8c1bf9d25a6367a651b5b054055a2130 (diff)
downloadcru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.gz
cru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.bz2
cru-560c0ead613658a2b7444907c3d1d69e49be8c32.zip
...
Diffstat (limited to 'src/ui/controls/TextBox.cpp')
-rw-r--r--src/ui/controls/TextBox.cpp5
1 files changed, 4 insertions, 1 deletions
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<TextRenderObject>(
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() {}