Skip to content

Commit

Permalink
egui: Simplify code using Painter::round_rect_to_pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
varphone committed Feb 19, 2024
1 parent 45f8a17 commit e9eb973
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/egui/src/containers/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,7 @@ impl<'open> Window<'open> {
},
);

title_rect.min = area_content_ui
.painter()
.round_pos_to_pixels(title_rect.min);
title_rect.max = area_content_ui
.painter()
.round_pos_to_pixels(title_rect.max);
title_rect = area_content_ui.painter().round_rect_to_pixels(title_rect);

if on_top && area_content_ui.visuals().window_highlight_topmost {
let mut round = window_frame.rounding;
Expand Down

0 comments on commit e9eb973

Please sign in to comment.