aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/BorderRenderObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/render/BorderRenderObject.cpp')
-rw-r--r--src/ui/render/BorderRenderObject.cpp7
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();
}