mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Fix sizing of images example
This commit is contained in:
@@ -6,7 +6,7 @@ use eframe::egui;
|
|||||||
fn main() -> eframe::Result {
|
fn main() -> eframe::Result {
|
||||||
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
|
env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
viewport: egui::ViewportBuilder::default().with_inner_size([600.0, 800.0]),
|
viewport: egui::ViewportBuilder::default().with_inner_size([400.0, 800.0]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
eframe::run_native(
|
eframe::run_native(
|
||||||
@@ -31,7 +31,6 @@ impl eframe::App for MyApp {
|
|||||||
ui.add(
|
ui.add(
|
||||||
egui::Image::new("https://picsum.photos/seed/1.759706314/1024").rounding(10.0),
|
egui::Image::new("https://picsum.photos/seed/1.759706314/1024").rounding(10.0),
|
||||||
);
|
);
|
||||||
|
|
||||||
ui.image(egui::include_image!("ferris.svg"));
|
ui.image(egui::include_image!("ferris.svg"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user