feat: add slint based stuff
This commit is contained in:
36
slint-based/ui/app-window.slint
Normal file
36
slint-based/ui/app-window.slint
Normal file
@ -0,0 +1,36 @@
|
||||
import { Button, VerticalBox , AboutSlint } from "std-widgets.slint";
|
||||
|
||||
export component AppWindow inherits Window {
|
||||
width: 320px;
|
||||
height: 240px;
|
||||
in-out property <int> counter: 42;
|
||||
callback request-increase-value();
|
||||
|
||||
VerticalBox {
|
||||
alignment: start;
|
||||
Text {
|
||||
text: "Hello World!";
|
||||
font-size: 24px;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "Counter App (Slint)";
|
||||
}
|
||||
|
||||
VerticalBox {
|
||||
Text {
|
||||
text: "Counter: \{root.counter}";
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Increase value";
|
||||
clicked => {
|
||||
root.request-increase-value();
|
||||
}
|
||||
}
|
||||
|
||||
// AboutSlint { }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user