ags: finish center-window widget with big-media and calendar

This commit is contained in:
retrozinndev
2025-02-16 19:29:03 -03:00
parent 1e6b3bcbe3
commit 23d3b271b4
19 changed files with 394 additions and 181 deletions
+37
View File
@@ -0,0 +1,37 @@
import { Variable } from "astal";
import { Astal, Gtk, Widget } from "astal/gtk3";
// TODO
export interface RunnerProps {
anchor?: Astal.WindowAnchor;
width?: number;
height?: number;
entryPlaceHolder?: string;
resultsPlaceholder?: Array<Gtk.Widget>;
}
export function Runner(props?: RunnerProps) {
const entryText: Variable<string> = new Variable<string>("");
const resultsBox: Widget.Box = new Widget.Box({
className: "results",
} as Widget.BoxProps);
return new Widget.Window({
namespace: "runner",
widthRequest: props?.width || 600,
heightRequest: props?.height || 500,
child: new Widget.Box({
className: "main",
children: [
new Widget.Entry({
className: "search",
onChanged: (entry) => entryText.set(entry.text),
} as Widget.EntryProps),
]
} as Widget.BoxProps)
} as Widget.WindowProps);
}