Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions druid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]
default = ["gtk"]
gtk = ["druid-shell/gtk"]
image = ["druid-shell/image"]
svg = ["usvg"]
svg = ["usvg", "resvg", "tiny-skia"]
x11 = ["druid-shell/x11"]
# **WARNING** not ready for the prime time. Many things don't work yet.
wayland = ["druid-shell/wayland"]
Expand Down Expand Up @@ -71,7 +71,9 @@ instant = { version = "0.1.12", features = ["wasm-bindgen"] }
# Optional dependencies
chrono = { version = "0.4.23", optional = true }
im = { version = "15.1.0", optional = true }
usvg = { version = "0.14.1", optional = true }
resvg = { version = "0.28.0", optional = true }
usvg = { version = "0.28.0", optional = true }
tiny-skia = { version = "0.8.2", optional = true }

[target.'cfg(target_arch="wasm32")'.dependencies]
tracing-wasm = { version = "0.2.1" }
Expand Down
4 changes: 2 additions & 2 deletions druid/examples/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use tracing::error;

use druid::{
widget::{FillStrat, Flex, Svg, SvgData, WidgetExt},
widget::{Flex, Svg, SvgData, WidgetExt},
AppLauncher, LocalizedString, Widget, WindowDesc,
};

Expand All @@ -47,7 +47,7 @@ fn ui_builder() -> impl Widget<u32> {
let mut col = Flex::column();

col.add_flex_child(Svg::new(tiger_svg.clone()).fix_width(60.0).center(), 1.0);
col.add_flex_child(Svg::new(tiger_svg.clone()).fill_mode(FillStrat::Fill), 1.0);
col.add_flex_child(Svg::new(tiger_svg.clone()), 1.0);
col.add_flex_child(Svg::new(tiger_svg), 1.0);
col.debug_paint_layout()
}
Loading