Files
qrcodegenerator/ui/template.slint
T
2025-01-17 17:05:35 -05:00

34 lines
891 B
Plaintext

import { AboutSlint, VerticalBox, TextEdit, Button, HorizontalBox } from "std-widgets.slint";
export component MainWindow inherits Window {
preferred-height: 250px;
preferred-width: 350px;
title: @tr("QR Code Generator");
icon: @image-url("../assets/qr-code.png");
in-out property <string> website;
callback convert();
VerticalBox {
Text {
text: "URL/Website:";
height: 10%;
}
TextEdit {
height: 17%;
horizontal-alignment: TextHorizontalAlignment.left;
wrap: TextWrap.no-wrap;
has-focus: true;
text <=> website;
}
Button {
text: "Convert to QR Code";
height: 10%;
clicked => {
root.convert();
}
}
AboutSlint {
height: 5px;
}
}
}