acid/firmware/acid-firmware/ui/main.slint

89 lines
2.4 KiB
Plaintext
Raw Normal View History

2026-01-20 02:55:17 +01:00
/*
import {
Button,
VerticalBox,
LineEdit,
GridBox,
TabWidget,
Button,
} from "std-widgets.slint";
*/
2025-12-31 22:24:26 +01:00
import { Button, VerticalBox, LineEdit, GridBox } from "std-widgets.slint";
// See https://github.com/slint-ui/slint/issues/4956 for issues with fonts.
import "../fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf";
2026-01-20 02:55:17 +01:00
/*
export enum AppState {
PasswordForm,
}
*/
export component AppWindow inherits Window {
in property <string> dummy: "ÄÖÜÁÉÍÓÚÝŔŚĹŹĆŃĚĽŽŠČŘĎŤŇŮÅäöüáéíóúýŕśĺźćńěľžščřďťňůåß„“”‘’—–@&$%+=¡¿¢£$¥€²³¼½¬¤¦§©®™°";
default-font-family: "IBM Plex Mono";
2025-12-31 22:24:26 +01:00
default-font-size: 16pt;
height: 368px;
width: 960px;
in-out property <int> counter: 42;
callback request-increase-value();
2026-01-20 02:55:17 +01:00
callback accepted(string);
VerticalBox {
2025-12-31 22:24:26 +01:00
width: 960px;
height: 368px;
padding: 0px;
2026-01-01 03:22:43 +01:00
padding-top: 120px;
padding-bottom: 8px;
Rectangle {
2026-01-01 03:49:59 +01:00
// For debugging bounds.
// background: #2c82ff;
// border-color: #ffcf00;
// border-width: 1px;
GridBox {
VerticalBox {
Text {
text: "Counter: \{root.counter}";
}
2025-12-31 22:24:26 +01:00
Button {
text: "Increase value";
clicked => {
2026-01-20 02:55:17 +01:00
root.counter += 1;
root.request-increase-value();
}
}
2025-12-31 22:24:26 +01:00
LineEdit {
input-type: InputType.text;
text: "LineEdit";
2026-01-20 02:55:17 +01:00
accepted(text) => {
root.accepted(text);
}
/*changed text => {
root.changed(self.text);
}*/
}
}
2026-01-20 02:55:17 +01:00
/*
TabWidget {
Tab {
title: "first";
Button {
text: "First";
}
}
2025-12-31 22:24:26 +01:00
2026-01-20 02:55:17 +01:00
Tab {
title: "second";
Button {
text: "Second";
}
}
}
2026-01-20 02:55:17 +01:00
*/
}
}
}
}