Skip to content

Commit

Permalink
fixed background color "leaking" during Border widget rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Dec 23, 2024
1 parent f6ab9d5 commit f39dded
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions fyrox-ui/src/border.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,12 @@ impl Control for Border {
None,
);
} else {
let thickness = self.stroke_thickness.left;
let half_thickness = thickness / 2.0;

DrawingContext::push_rounded_rect_filled(
drawing_context,
&bounds,
&bounds.deflate(half_thickness, half_thickness),
**self.corner_radius,
16,
);
Expand All @@ -253,12 +256,7 @@ impl Control for Border {
None,
);

drawing_context.push_rounded_rect(
&bounds,
self.stroke_thickness.left,
**self.corner_radius,
16,
);
drawing_context.push_rounded_rect(&bounds, thickness, **self.corner_radius, 16);
drawing_context.commit(
self.clip_bounds(),
self.widget.foreground(),
Expand Down

0 comments on commit f39dded

Please sign in to comment.