aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/border.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-10-04 01:47:49 +0800
committercrupest <crupest@outlook.com>2018-10-04 01:47:49 +0800
commit01ab4511d3006e9f65ff96ae63b21de14b41bc48 (patch)
treee4fa991e7784571c164301ff7ade5aa1ef515744 /src/ui/controls/border.cpp
parent30ecda8bb354d5982978af97aa90b5f49d9ea195 (diff)
downloadcru-01ab4511d3006e9f65ff96ae63b21de14b41bc48.tar.gz
cru-01ab4511d3006e9f65ff96ae63b21de14b41bc48.tar.bz2
cru-01ab4511d3006e9f65ff96ae63b21de14b41bc48.zip
...
Diffstat (limited to 'src/ui/controls/border.cpp')
-rw-r--r--src/ui/controls/border.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/ui/controls/border.cpp b/src/ui/controls/border.cpp
deleted file mode 100644
index 1caed91d..00000000
--- a/src/ui/controls/border.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "border.h"
-
-#include "graph/graph.h"
-
-namespace cru::ui::controls
-{
- using graph::CreateSolidBrush;
-
- Border::Border() : Control(true), border_delegate_(this)
- {
-
- }
-
- void Border::SetDrawBorder(const bool draw_border)
- {
- draw_border_ = draw_border;
- Repaint();
- }
-
- void Border::OnDraw(ID2D1DeviceContext* device_context)
- {
- if (draw_border_)
- {
- border_delegate_.Draw(device_context, GetSize());
- }
- }
-
- Size Border::OnMeasure(const Size& available_size)
- {
- return Control::DefaultMeasureWithPadding(available_size, border_delegate_.GetBorderThickness());
- }
-
- void Border::OnLayout(const Rect& rect)
- {
- Control::DefaultLayoutWithPadding(rect, border_delegate_.GetBorderThickness());
- }
-}