diff options
Diffstat (limited to 'src/ui/controls/border_delegate.cpp')
-rw-r--r-- | src/ui/controls/border_delegate.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ui/controls/border_delegate.cpp b/src/ui/controls/border_delegate.cpp index 0b460997..c8855e0f 100644 --- a/src/ui/controls/border_delegate.cpp +++ b/src/ui/controls/border_delegate.cpp @@ -1,7 +1,19 @@ #include "border_delegate.h" +#include "graph/graph.h" namespace cru::ui::controls { + BorderProperty::Ptr BorderProperty::Create() + { + return std::make_shared<BorderProperty>(graph::CreateSolidBrush(D2D1::ColorF(D2D1::ColorF::Black))); + } + + BorderProperty::BorderProperty(Microsoft::WRL::ComPtr<ID2D1Brush> brush) + : brush_(std::move(brush)) + { + + } + void BorderProperty::SetBrush(Microsoft::WRL::ComPtr<ID2D1Brush> brush) { brush_ = std::move(brush); @@ -33,7 +45,7 @@ namespace cru::ui::controls } BorderDelegate::BorderDelegate(Control* control) - : BorderDelegate(control, std::make_shared<BorderProperty>()) + : BorderDelegate(control, BorderProperty::Create()) { } |