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