Skip to content

Commit

Permalink
Fix: images with background color now respects rounding (#4029)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Sparks <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
  • Loading branch information
3 people authored Feb 18, 2024
1 parent ca8c879 commit 68b3ef7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/egui/src/widgets/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,7 @@ pub fn paint_texture_at(
texture: &SizedTexture,
) {
if options.bg_fill != Default::default() {
let mut mesh = Mesh::default();
mesh.add_colored_rect(rect, options.bg_fill);
painter.add(Shape::mesh(mesh));
painter.add(RectShape::filled(rect, options.rounding, options.bg_fill));
}

match options.rotation {
Expand Down

0 comments on commit 68b3ef7

Please sign in to comment.