diff options
author | crupest <crupest@outlook.com> | 2020-12-24 23:51:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-12-24 23:51:15 +0800 |
commit | c80808cf38b863f3bd84400eb7cf948d461238e0 (patch) | |
tree | e2f16c02a8bd085d040bbb1392c1021c5a1fc8bc /src/ui/render/BorderRenderObject.cpp | |
parent | 253fcf881d04d0c86236e4cf0067f08eea39f051 (diff) | |
download | cru-c80808cf38b863f3bd84400eb7cf948d461238e0.tar.gz cru-c80808cf38b863f3bd84400eb7cf948d461238e0.tar.bz2 cru-c80808cf38b863f3bd84400eb7cf948d461238e0.zip |
...
Diffstat (limited to 'src/ui/render/BorderRenderObject.cpp')
-rw-r--r-- | src/ui/render/BorderRenderObject.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/render/BorderRenderObject.cpp b/src/ui/render/BorderRenderObject.cpp index c176e760..e2c40f0c 100644 --- a/src/ui/render/BorderRenderObject.cpp +++ b/src/ui/render/BorderRenderObject.cpp @@ -6,6 +6,7 @@ #include "cru/platform/graphics/Geometry.hpp" #include "cru/platform/graphics/util/Painter.hpp" #include "cru/ui/style/ApplyBorderStyleInfo.hpp" +#include "gsl/gsl_assert" #include <algorithm> @@ -19,11 +20,11 @@ BorderRenderObject::~BorderRenderObject() {} void BorderRenderObject::ApplyBorderStyle( const style::ApplyBorderStyleInfo& style) { - if (style.border_brush != nullptr) border_brush_ = style.border_brush; + if (style.border_brush) border_brush_ = *style.border_brush; if (style.border_thickness) border_thickness_ = *style.border_thickness; if (style.border_radius) border_radius_ = *style.border_radius; - if (style.foreground_brush) foreground_brush_ = style.foreground_brush; - if (style.background_brush) background_brush_ = style.background_brush; + if (style.foreground_brush) foreground_brush_ = *style.foreground_brush; + if (style.background_brush) background_brush_ = *style.background_brush; InvalidateLayout(); } |