2025-12-31 22:24:26 +01:00
|
|
|
import { Button, VerticalBox, LineEdit, GridBox } from "std-widgets.slint";
|
2025-12-29 19:36:00 +01:00
|
|
|
|
|
|
|
|
export component AppWindow inherits Window {
|
2025-12-31 22:24:26 +01:00
|
|
|
default-font-family: "IBM Plex Sans";
|
|
|
|
|
default-font-size: 16pt;
|
2026-01-01 03:07:13 +01:00
|
|
|
height: 368px;
|
|
|
|
|
width: 960px;
|
|
|
|
|
in-out property <int> counter: 42;
|
2025-12-29 19:36:00 +01:00
|
|
|
callback request-increase-value();
|
2026-01-01 03:07:13 +01:00
|
|
|
VerticalBox {
|
2025-12-31 22:24:26 +01:00
|
|
|
width: 960px;
|
2026-01-01 03:07:13 +01:00
|
|
|
height: 368px;
|
|
|
|
|
padding: 0px;
|
2026-01-01 03:22:43 +01:00
|
|
|
padding-top: 120px;
|
|
|
|
|
padding-bottom: 8px;
|
2026-01-01 03:07:13 +01:00
|
|
|
Rectangle {
|
2026-01-01 03:49:59 +01:00
|
|
|
// For debugging bounds.
|
|
|
|
|
// background: #2c82ff;
|
|
|
|
|
// border-color: #ffcf00;
|
|
|
|
|
// border-width: 1px;
|
2026-01-01 03:07:13 +01:00
|
|
|
GridBox {
|
|
|
|
|
VerticalBox {
|
|
|
|
|
Text {
|
|
|
|
|
text: "Counter: \{root.counter}";
|
|
|
|
|
}
|
2025-12-31 22:24:26 +01:00
|
|
|
|
2026-01-01 03:07:13 +01:00
|
|
|
Button {
|
|
|
|
|
text: "Increase value";
|
|
|
|
|
clicked => {
|
|
|
|
|
root.request-increase-value();
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-31 22:24:26 +01:00
|
|
|
|
2026-01-01 03:07:13 +01:00
|
|
|
LineEdit {
|
|
|
|
|
input-type: InputType.password;
|
|
|
|
|
text: "LineEdit";
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-29 19:36:00 +01:00
|
|
|
|
2026-01-01 03:07:13 +01:00
|
|
|
Button {
|
|
|
|
|
text: "Button";
|
|
|
|
|
}
|
2025-12-31 22:24:26 +01:00
|
|
|
|
2026-01-01 03:07:13 +01:00
|
|
|
Button {
|
|
|
|
|
text: "Button";
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-29 19:36:00 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|