Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rounding of ImageButton #3531

Merged
merged 5 commits into from
Nov 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unnecessary struct creation
  • Loading branch information
chriscate committed Nov 5, 2023
commit 90bdfbc43f759be5bb19622a3fb8fbfd311551c9
5 changes: 2 additions & 3 deletions crates/egui/src/widgets/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,8 @@ impl<'a> Widget for ImageButton<'a> {
.layout()
.align_size_within_rect(image_size, rect.shrink2(padding));
// let image_rect = image_rect.expand2(expansion); // can make it blurry, so let's not
let image_options = ImageOptions {
..self.image.image_options().clone()
};
let image_options = self.image.image_options().clone();

widgets::image::paint_texture_load_result(ui, &tlr, image_rect, None, &image_options);

// Draw frame outline:
Expand Down