diff options
author | crupest <crupest@outlook.com> | 2022-02-24 16:35:08 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-24 16:35:08 +0800 |
commit | e80f44385dee8636b747848ecb6193c41a99d89c (patch) | |
tree | d004d27715d5bbaa3fd087dc8570787eae0549ca /src/ui/controls/CheckBox.cpp | |
parent | a7f5275267e1b504b119e2e3b7fcd46a88874821 (diff) | |
download | cru-e80f44385dee8636b747848ecb6193c41a99d89c.tar.gz cru-e80f44385dee8636b747848ecb6193c41a99d89c.tar.bz2 cru-e80f44385dee8636b747848ecb6193c41a99d89c.zip |
...
Diffstat (limited to 'src/ui/controls/CheckBox.cpp')
-rw-r--r-- | src/ui/controls/CheckBox.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/controls/CheckBox.cpp b/src/ui/controls/CheckBox.cpp index cace3dbf..a28c4633 100644 --- a/src/ui/controls/CheckBox.cpp +++ b/src/ui/controls/CheckBox.cpp @@ -1,4 +1,5 @@ #include "cru/ui/controls/CheckBox.h" +#include "cru/ui/ThemeManager.h" #include "cru/ui/helper/ClickDetector.h" #include "cru/ui/render/BorderRenderObject.h" @@ -8,6 +9,11 @@ CheckBox::CheckBox() click_detector_(this) { container_render_object_->SetAttachedControl(this); + container_render_object_->SetBorderEnabled(true); + auto default_checkbox_style = + ThemeManager::GetInstance()->GetResourceStyleRuleSet(u"checkbox.style"); + GetStyleRuleSet()->SetParent(std::move(default_checkbox_style)); + click_detector_.ClickEvent()->AddHandler( [this](const helper::ClickEventArgs&) { Toggle(); }); } |