frontend: the advoware GUI
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
27
frontend/examples/image.rs-0.3.1-alpha1
Normal file
27
frontend/examples/image.rs-0.3.1-alpha1
Normal file
@@ -0,0 +1,27 @@
|
||||
use orbtk::prelude::*;
|
||||
|
||||
fn main() {
|
||||
// use this only if you want to run it as web application.
|
||||
orbtk::initialize();
|
||||
|
||||
Application::new()
|
||||
.window(|ctx| {
|
||||
Window::create()
|
||||
.title("OrbTk - image example")
|
||||
.position((100.0, 100.0))
|
||||
.size(610.0, 610.0)
|
||||
.resizeable(true)
|
||||
.child(
|
||||
ImageWidget::create()
|
||||
.image("resources/images/advotracker.jpg")
|
||||
.margin(10.0)
|
||||
.vertical_alignment("Center")
|
||||
.horizontal_alignment("Center")
|
||||
.size(600.0, 600.0)
|
||||
.clip(true)
|
||||
.build(ctx),
|
||||
)
|
||||
.build(ctx)
|
||||
})
|
||||
.run();
|
||||
}
|
||||
Reference in New Issue
Block a user