Files
bropicker/ui/todo.slint
T
2026-05-07 00:30:14 +05:00

65 lines
1.6 KiB
Plaintext

import {
SpinBox,
Button,
CheckBox,
Slider,
LineEdit,
ScrollView,
ListView,
HorizontalBox,
VerticalBox,
GridBox,
StandardButton,
Palette,
} from "std-widgets.slint";
@rust-attr(derive(serde::Serialize, serde::Deserialize))
export struct BrowserConfig {
path: string,
flags: string,
}
export component MainWindow inherits Window {
in property <[BrowserConfig]> browser-model: [
{ path: "chrome.exe", flags: "profile 1" },
{ path: "chrome.exe", flags: "profile 2" },
{ path: "zen.exe", flags: "" },
{ path: "edge.exe", flags: "" },
];
callback todo-added(string);
callback remove-done();
callback update_todo(BrowserConfig);
preferred-width: 400px;
preferred-height: 600px;
VerticalBox {
x: root.safe-area-insets.left;
y: root.safe-area-insets.top;
width: root.width - root.safe-area-insets.right - root.safe-area-insets.left;
height: root.height - root.safe-area-insets.bottom - root.safe-area-insets.top;
list-view := ListView {
for browser in root.browser-model: HorizontalLayout {
HorizontalBox {
padding: 8px;
alignment: center;
Text {
text: browser.path;
}
Text {
text: browser.flags;
}
Button {
text: "use";
}
}
}
}
}
}