Experiments with slint

This commit is contained in:
Margret Riegert
2026-02-22 23:23:49 -05:00
parent e71ddcb726
commit f7af29eb75
4 changed files with 72 additions and 18 deletions

View File

@@ -1,18 +1,32 @@
import { Button, VerticalBox } from "std-widgets.slint";
import { Button, VerticalBox, TextEdit } from "std-widgets.slint";
import { ChatView } from "chat-view.slint";
export component AppWindow inherits Window {
in-out property <int> counter: 42;
callback request-increase-value();
VerticalBox {
Text {
text: "Counter: \{root.counter}";
VerticalLayout {
ChatView {
messages: [
{ text: "hello", sender: "Bob", time: "10:00" },
{ text: "hey!", sender: "Joe", time: "10:01" },
{ text: "i like cats c:", sender: "Bob", time: "10:03" },
{ text: "me too c:", sender: "Joe", time: "10:08" },
{
text: "meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow ",
sender: "Joe",
time: "10:08"
},
{
text: "meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow ",
sender: "Bob",
time: "10:12"
},
];
}
Button {
text: "Increase value";
clicked => {
root.request-increase-value();
}
TextEdit {
height: 64px;
font-size: 16px;
}
}
}