parent
d0cbde9442
commit
7f788d8662
@ -1,19 +1,48 @@
|
|||||||
import { Button, VerticalBox } from "std-widgets.slint";
|
import { Button, VerticalBox, GridBox, LineEdit } from "std-widgets.slint";
|
||||||
|
|
||||||
export component AppWindow inherits Window {
|
export component AppWindow inherits Window {
|
||||||
in-out property <int> counter: 42;
|
in-out property <int> counter: 42;
|
||||||
callback request-increase-value();
|
callback request-increase-value();
|
||||||
VerticalBox {
|
|
||||||
Text {
|
background: #313e50;
|
||||||
text: "Counter: \{root.counter}";
|
|
||||||
|
GridBox {
|
||||||
|
spacing: 25px;
|
||||||
|
padding: 50px;
|
||||||
|
Row {
|
||||||
|
Text {
|
||||||
|
text: "Calculator";
|
||||||
|
horizontal-alignment: center;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 900;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Row{
|
||||||
|
LineEdit {
|
||||||
|
placeholder-text: "Enter value";
|
||||||
|
font-size: 16px;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
Button {
|
||||||
|
text: "Increase value";
|
||||||
|
clicked => {
|
||||||
|
root.request-increase-value();
|
||||||
|
}
|
||||||
|
height: 35px;
|
||||||
|
primary: true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Row {
|
||||||
text: "Increase value";
|
Text {
|
||||||
clicked => {
|
text: "Counter: \{root.counter}";
|
||||||
root.request-increase-value();
|
color: #a3a1dd;
|
||||||
}
|
}
|
||||||
height: 35px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in new issue