summaryrefslogtreecommitdiffstats
path: root/examples/svg
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-26 20:11:01 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-26 20:11:01 +0100
commit883a9f22e2e868fa0f85b1ac251392c12bf83696 (patch)
tree45b2c69773753f475f98066bb21e43a755c72df0 /examples/svg
parentd06d06e05096e0145be74fd02d67eada0a1665a1 (diff)
downloadiced-883a9f22e2e868fa0f85b1ac251392c12bf83696.tar.gz
iced-883a9f22e2e868fa0f85b1ac251392c12bf83696.tar.bz2
iced-883a9f22e2e868fa0f85b1ac251392c12bf83696.zip
Add `env_logger` to `svg` example
Diffstat (limited to 'examples/svg')
-rw-r--r--examples/svg/Cargo.toml1
-rw-r--r--examples/svg/src/main.rs11
2 files changed, 9 insertions, 3 deletions
diff --git a/examples/svg/Cargo.toml b/examples/svg/Cargo.toml
index d8f83ac2..161ee6a8 100644
--- a/examples/svg/Cargo.toml
+++ b/examples/svg/Cargo.toml
@@ -7,3 +7,4 @@ publish = false
[dependencies]
iced = { path = "../..", features = ["svg"] }
+env_logger = "0.7"
diff --git a/examples/svg/src/main.rs b/examples/svg/src/main.rs
index 1fb80534..811fdfb5 100644
--- a/examples/svg/src/main.rs
+++ b/examples/svg/src/main.rs
@@ -1,6 +1,8 @@
use iced::{Column, Container, Element, Length, Sandbox, Settings, Svg};
pub fn main() {
+ env_logger::init();
+
Tiger::run(Settings::default())
}
@@ -22,9 +24,12 @@ impl Sandbox for Tiger {
fn view(&mut self) -> Element<()> {
let content = Column::new().padding(20).push(
- Svg::new(format!("{}/resources/tiger.svg", env!("CARGO_MANIFEST_DIR")))
- .width(Length::Fill)
- .height(Length::Fill),
+ Svg::new(format!(
+ "{}/resources/tiger.svg",
+ env!("CARGO_MANIFEST_DIR")
+ ))
+ .width(Length::Fill)
+ .height(Length::Fill),
);
Container::new(content)