fschutt/azul

Label does not display

bru65pag opened this issue · 0 comments

Good evening,

I'm trying to build a "Hello World" program with azul. I came up with the following code (re-using some code i found on the wiki):

extern crate azul;

use azul::{prelude::*, widgets::{label::Label}};

struct HelloWorld { }

impl Layout for HelloWorld {
    fn layout(&self, _: LayoutInfo<Self>) -> Dom<Self> {
        let label = Label::new("Hello World").dom();

        Dom::div()
         .with_child(label)
    }
}

fn main() {
    let mut app = App::new(HelloWorld { }, AppConfig::default()).unwrap();
    let window = app.create_window(WindowCreateOptions::default(), css::native()).unwrap();
    app.run(window).unwrap();
}

It compiles well. However, when I run it, I get an empty window; my label is not displayed :-(

I must be missing something obvious... You're help is welcome.