Files
SoftwareManager-rs/ui/app-window.slint
T

34 lines
933 B
Plaintext

import { Button, LineEdit, VerticalBox, HorizontalBox, StandardTableView } from "std-widgets.slint";
export component AppWindow inherits Window {
in-out property <string> search-text: "";
callback request-text-input(string);
in-out property <[[StandardListViewItem]]> table-data;
callback add-row();
VerticalBox {
alignment: stretch;
LineEdit {
placeholder-text: "Search for Software";
accepted(text) => {
root.request-text-input(self.text);
}
}
HorizontalBox {
alignment: stretch;
table := StandardTableView {
columns: [
{ title: "Post Title", horizontal_stretch: 0.5 },
{ title: "Author", horizontal_stretch: 0.3 },
{ title: "Seeders", horizontal_stretch: 0.1 },
{ title: "Leechers", horizontal_stretch: 0.1 },
];
rows: table-data;
}
}
}
}