Add env_logger to svg example
This commit is contained in:
parent
d06d06e050
commit
883a9f22e2
2 changed files with 9 additions and 3 deletions
|
|
@ -7,3 +7,4 @@ publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced = { path = "../..", features = ["svg"] }
|
iced = { path = "../..", features = ["svg"] }
|
||||||
|
env_logger = "0.7"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
use iced::{Column, Container, Element, Length, Sandbox, Settings, Svg};
|
use iced::{Column, Container, Element, Length, Sandbox, Settings, Svg};
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
env_logger::init();
|
||||||
|
|
||||||
Tiger::run(Settings::default())
|
Tiger::run(Settings::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22,7 +24,10 @@ impl Sandbox for Tiger {
|
||||||
|
|
||||||
fn view(&mut self) -> Element<()> {
|
fn view(&mut self) -> Element<()> {
|
||||||
let content = Column::new().padding(20).push(
|
let content = Column::new().padding(20).push(
|
||||||
Svg::new(format!("{}/resources/tiger.svg", env!("CARGO_MANIFEST_DIR")))
|
Svg::new(format!(
|
||||||
|
"{}/resources/tiger.svg",
|
||||||
|
env!("CARGO_MANIFEST_DIR")
|
||||||
|
))
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.height(Length::Fill),
|
.height(Length::Fill),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue