From 65e288c40a593965b41378755f7111c56e123295 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 26 Feb 2022 19:46:37 +0800 Subject: ... --- src/theme_builder/components/properties/ColorPropertyEditor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/theme_builder/components') diff --git a/src/theme_builder/components/properties/ColorPropertyEditor.cpp b/src/theme_builder/components/properties/ColorPropertyEditor.cpp index 49911f77..89b145a7 100644 --- a/src/theme_builder/components/properties/ColorPropertyEditor.cpp +++ b/src/theme_builder/components/properties/ColorPropertyEditor.cpp @@ -1,6 +1,7 @@ #include "ColorPropertyEditor.h" #include "cru/platform/graphics/Factory.h" #include "cru/ui/Base.h" +#include "cru/ui/ThemeManager.h" namespace cru::theme_builder::components::properties { ColorPropertyEditor::ColorPropertyEditor() { @@ -8,9 +9,15 @@ ColorPropertyEditor::ColorPropertyEditor() { container_.AddChild(&color_cube_); container_.AddChild(&color_text_); + color_cube_.SetBorderEnabled(true); + color_cube_.GetStyleRuleSet()->SetParent( + ui::ThemeManager::GetInstance()->GetResourceStyleRuleSet( + u"cru.theme_builder.color_cube.style")); + color_cube_brush_ = platform::gui::IUiApplication::GetInstance() ->GetGraphicsFactory() ->CreateSolidColorBrush(color_); + color_cube_.SetForegroundBrush(color_cube_brush_); color_text_.SetText(color_.ToString()); -- cgit v1.2.3