feat: add minimal styles

This commit is contained in:
tux
2025-06-16 23:16:07 +05:30
parent e93f98d154
commit db99f77c26
2 changed files with 40 additions and 33 deletions

View File

@@ -14,7 +14,7 @@ const hide = () => {
const AppButton = ({ app }: { app: AstalApps.Application }) => {
return (
<button
cssClasses={["app-button"]}
cssClasses={["button"]}
onClicked={() => {
hide();
app.launch();
@@ -33,7 +33,7 @@ const AppList = () => {
return (
<Gtk.ScrolledWindow vexpand heightRequest={500} widthRequest={300}>
<box vertical spacing={6} cssClasses={["app-list"]}>
<box vertical spacing={6} cssClasses={["list"]}>
{appList.as((list) => list.map((app) => <AppButton app={app} />))}
</box>
</Gtk.ScrolledWindow>
@@ -46,19 +46,10 @@ const AppSearch = () => {
hide();
};
return (
<overlay cssClasses={["entry-overlay"]} heightRequest={100}>
<Gtk.ScrolledWindow heightRequest={100}>
<Picture
file={Gio.file_new_for_path("/home/tux/Wallpapers/5m5kLI9.png")}
contentFit={Gtk.ContentFit.COVER}
overflow={Gtk.Overflow.HIDDEN}
/>
</Gtk.ScrolledWindow>
<entry
type="overlay"
cssClasses={["search"]}
vexpand
text={text.get()}
primaryIconName={"system-search-symbolic"}
placeholderText="Search..."
onChanged={(self) => text.set(self.text)}
onActivate={onEnter}
@@ -75,7 +66,6 @@ const AppSearch = () => {
});
}}
/>
</overlay>
);
};
@@ -96,6 +86,7 @@ export const AppLauncher = (gdkmonitor: Gdk.Monitor) => {
>
<box vertical spacing={6}>
<AppSearch />
<Gtk.Separator orientation={Gtk.Orientation.HORIZONTAL} />
<AppList />
</box>
</window>

View File

@@ -3,12 +3,28 @@ window.app-launcher {
border-radius: $rounded;
padding: 10px;
.app-list {
.search {
min-width: 300px;
padding: 10px;
color: rgba($fg-color, 0.5);
}
separator {
border: 1px solid rgba($inactive-color, 0.5);
}
.list {
background: $bg-color;
}
.app-button {
.button {
border-radius: $rounded;
padding: 10px;
&:hover,
&:focus {
background: $inactive-color;
}
}
.name {