Merge branch 'master' into feature/container-padding
This commit is contained in:
commit
990b4aa0b7
5 changed files with 82 additions and 37 deletions
|
|
@ -7,4 +7,3 @@ publish = false
|
|||
|
||||
[dependencies]
|
||||
iced = { path = "../..", features = ["svg"] }
|
||||
env_logger = "0.7"
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue