fix ui widget alignment, remove add row button, add timer for search request

This commit is contained in:
2026-07-27 01:52:24 +02:00
parent 7ba312528f
commit 153ba18d1c
3 changed files with 40 additions and 42 deletions
+5 -19
View File
@@ -1,9 +1,6 @@
import { Button, LineEdit, VerticalBox, HorizontalBox, StandardTableView } from "std-widgets.slint";
export component AppWindow inherits Window {
width: 200px;
height: 60px;
in-out property <string> search-text: "";
callback request-text-input(string);
@@ -11,11 +8,8 @@ export component AppWindow inherits Window {
callback add-row();
VerticalBox {
alignment: stretch;
// width: 50%;
// height: 50%;
LineEdit {
width: 500px;
placeholder-text: "Search for Software";
accepted(text) => {
root.request-text-input(self.text);
@@ -23,25 +17,17 @@ export component AppWindow inherits Window {
}
HorizontalBox {
alignment: stretch;
table := StandardTableView {
// width: 230px;
// height: 200px;
columns: [
{ title: "Post Title" },
{ title: "Author" },
{ title: "Seeders" },
{ title: "Leechers" },
{ 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;
}
Button {
text: "Add row";
clicked => {
add-row();
}
}
}
}
}