mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Track original SVG size (#7098)
This fixes bugs related to how an `Image` follows the size of an SVG. We track the "source size" of each image, i.e. the original width/height of the SVG, which can be different from whatever it was rasterized as.
This commit is contained in:
@@ -75,12 +75,9 @@ impl ImageLoader for SvgLoader {
|
||||
match ctx.try_load_bytes(uri) {
|
||||
Ok(BytesPoll::Ready { bytes, .. }) => {
|
||||
log::trace!("Started loading {uri:?}");
|
||||
let result = crate::image::load_svg_bytes_with_size(
|
||||
&bytes,
|
||||
Some(size_hint),
|
||||
&self.options,
|
||||
)
|
||||
.map(Arc::new);
|
||||
let result =
|
||||
crate::image::load_svg_bytes_with_size(&bytes, size_hint, &self.options)
|
||||
.map(Arc::new);
|
||||
|
||||
log::trace!("Finished loading {uri:?}");
|
||||
bucket.insert(
|
||||
|
||||
Reference in New Issue
Block a user