safe
This commit is contained in:
@@ -24,9 +24,10 @@ export const AppsWindow = (mon: number) => {
|
||||
const [results, setResults] = createState(getApps() as Array<AstalApps.Application>);
|
||||
|
||||
return <PopupWindow namespace="apps-window" layer={Astal.Layer.OVERLAY}
|
||||
exclusivity={Astal.Exclusivity.IGNORE} monitor={mon} marginTop={64}
|
||||
exclusivity={Astal.Exclusivity.IGNORE} monitor={mon} marginTop={64}
|
||||
class={"apps-window"} orientation={Gtk.Orientation.VERTICAL}
|
||||
cssBackgroundWindow="background: rgba(0, 0, 0, .2);"
|
||||
cssBackgroundWindow="background: rgba(0, 0, 0, .2);" halign={Gtk.Align.FILL}
|
||||
valign={Gtk.Align.FILL} hexpand vexpand
|
||||
actionKeyPressed={(self, key) => {
|
||||
const entry = getPopupWindowContainer(self).get_first_child()!
|
||||
.get_first_child()!.get_first_child()! as Gtk.SearchEntry;
|
||||
@@ -36,8 +37,8 @@ export const AppsWindow = (mon: number) => {
|
||||
|
||||
entry.grab_focus();
|
||||
}}>
|
||||
<Gtk.Box hexpand={false} halign={Gtk.Align.CENTER}>
|
||||
<Gtk.SearchEntry hexpand={false} onSearchChanged={(self) => {
|
||||
<Gtk.Box hexpand halign={Gtk.Align.CENTER}>
|
||||
<Gtk.SearchEntry hexpand onSearchChanged={(self) => {
|
||||
setResults(getAstalApps().fuzzy_query(self.text.trim()));
|
||||
}} onStopSearch={(self) => (self.get_root() as Astal.Window)?.close()} />
|
||||
</Gtk.Box>
|
||||
@@ -46,9 +47,11 @@ export const AppsWindow = (mon: number) => {
|
||||
hscrollbarPolicy={Gtk.PolicyType.NEVER} overlayScrolling
|
||||
propagateNaturalHeight={false} hexpand vexpand>
|
||||
|
||||
<Gtk.Box hexpand={false} vexpand={false}>
|
||||
<Gtk.FlowBox rowSpacing={60} columnSpacing={60} activateOnSingleClick
|
||||
minChildrenPerLine={1} homogeneous onChildActivated={(_, child) =>
|
||||
<Gtk.Box hexpand vexpand>
|
||||
<Gtk.FlowBox orientation={Gtk.Orientation.HORIZONTAL}
|
||||
rowSpacing={32} columnSpacing={32} activateOnSingleClick
|
||||
minChildrenPerLine={4} maxChildrenPerLine={10} hexpand homogeneous
|
||||
onChildActivated={(_, child) =>
|
||||
child.get_child()!.activate() // pass activation to button
|
||||
}>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user