mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
"Final" image polish (#3342)
* Improve the Image API a bit * Improve image view demo * Better names * calculate -> calc
This commit is contained in:
@@ -105,13 +105,17 @@ impl eframe::App for ImageViewer {
|
||||
|
||||
// bg_fill
|
||||
ui.add_space(2.0);
|
||||
ui.label("Background color");
|
||||
ui.color_edit_button_srgba(&mut self.image_options.bg_fill);
|
||||
ui.horizontal(|ui| {
|
||||
ui.color_edit_button_srgba(&mut self.image_options.bg_fill);
|
||||
ui.label("Background color");
|
||||
});
|
||||
|
||||
// tint
|
||||
ui.add_space(2.0);
|
||||
ui.label("Tint");
|
||||
ui.color_edit_button_srgba(&mut self.image_options.tint);
|
||||
ui.horizontal(|ui| {
|
||||
ui.color_edit_button_srgba(&mut self.image_options.tint);
|
||||
ui.label("Tint");
|
||||
});
|
||||
|
||||
// fit
|
||||
ui.add_space(10.0);
|
||||
|
||||
Reference in New Issue
Block a user