aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/border_render_object.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-03-19 19:45:26 +0800
committercrupest <crupest@outlook.com>2020-03-19 19:45:26 +0800
commit507de8c6a931d0784c8f740d41db610d3ed8db68 (patch)
tree9f77d8e2b1b0955ff669677b4d5913a08075946a /src/ui/render/border_render_object.cpp
parent5da4f511e85de9e79bee40e3c5e04f899a48723c (diff)
downloadcru-507de8c6a931d0784c8f740d41db610d3ed8db68.tar.gz
cru-507de8c6a931d0784c8f740d41db610d3ed8db68.tar.bz2
cru-507de8c6a931d0784c8f740d41db610d3ed8db68.zip
...
Diffstat (limited to 'src/ui/render/border_render_object.cpp')
-rw-r--r--src/ui/render/border_render_object.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/render/border_render_object.cpp b/src/ui/render/border_render_object.cpp
index 16f2828a..5b6cdb3c 100644
--- a/src/ui/render/border_render_object.cpp
+++ b/src/ui/render/border_render_object.cpp
@@ -39,6 +39,15 @@ void BorderRenderObject::Draw(platform::graph::IPainter* painter) {
foreground_brush_.get());
}
+void BorderRenderObject::SetBorderStyle(const BorderStyle& style) {
+ border_brush_ = style.border_brush;
+ border_thickness_ = style.border_thickness;
+ border_radius_ = style.border_radius;
+ foreground_brush_ = style.foreground_brush;
+ background_brush_ = style.background_brush;
+ InvalidateLayout();
+}
+
RenderObject* BorderRenderObject::HitTest(const Point& point) {
if (const auto child = GetChild()) {
auto offset = child->GetOffset();