fix ui widget alignment, remove add row button, add timer for search request
This commit is contained in:
+5
-19
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user