From 8d5a08e8d054e9504ca31e0bfbfff7a1018c23c0 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 10 Nov 2018 15:53:32 +0800 Subject: Refactor predefine resources. Add check for dead recursion in singletons in debug mode. --- src/ui/border_property.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/ui/border_property.cpp') diff --git a/src/ui/border_property.cpp b/src/ui/border_property.cpp index bd06a96a..b79bb482 100644 --- a/src/ui/border_property.cpp +++ b/src/ui/border_property.cpp @@ -1,10 +1,10 @@ #include "border_property.hpp" -#include "predefine.hpp" +#include "ui_manager.hpp" namespace cru::ui { - BorderProperty::BorderProperty(): BorderProperty(predefine::GetPredefineResourceComPtr(predefine::key_border_property_brush)) + BorderProperty::BorderProperty(): BorderProperty(UiManager::GetInstance()->GetPredefineResources()->border_property_brush) { } @@ -13,4 +13,11 @@ namespace cru::ui { } + + BorderProperty::BorderProperty(Microsoft::WRL::ComPtr brush, const float width, const float radius_x, + const float radius_y, Microsoft::WRL::ComPtr stroke_style) : + brush_(std::move(brush)), stroke_width_(width), radius_x_(radius_x), radius_y_(radius_y), stroke_style_(std::move(stroke_style)) + { + + } } -- cgit v1.2.3