Merge branch 'master' into feature/container-padding

This commit is contained in:
Héctor Ramón Jiménez 2020-03-31 17:11:58 +02:00
commit 990b4aa0b7
5 changed files with 82 additions and 37 deletions

View file

@ -7,4 +7,3 @@ publish = false
[dependencies]
iced = { path = "../..", features = ["svg"] }
env_logger = "0.7"

View file

@ -1,19 +1,16 @@
use iced::{Container, Element, Length, Sandbox, Settings, Svg};
pub fn main() {
env_logger::init();
Tiger::run(Settings::default())
}
#[derive(Default)]
struct Tiger;
impl Sandbox for Tiger {
type Message = ();
fn new() -> Self {
Self::default()
Tiger
}
fn title(&self) -> String {
@ -23,7 +20,7 @@ impl Sandbox for Tiger {
fn update(&mut self, _message: ()) {}
fn view(&mut self) -> Element<()> {
let svg = Svg::new(format!(
let svg = Svg::from_path(format!(
"{}/resources/tiger.svg",
env!("CARGO_MANIFEST_DIR")
))