From e80f44385dee8636b747848ecb6193c41a99d89c Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 24 Feb 2022 16:35:08 +0800 Subject: ... --- src/ui/controls/CheckBox.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ui/controls/CheckBox.cpp') 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(); }); } -- cgit v1.2.3