diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-01 16:24:06 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-01 16:24:06 +1100 |
| commit | 3d4577044ee400fc26b0d36ee90d562cf37e969c (patch) | |
| tree | cb6bcf13f1cad2933adf75244a57a865b4bde7aa /src/modules/launcher | |
| parent | config: lazy update arrays (diff) | |
| download | caelestia-shell-3d4577044ee400fc26b0d36ee90d562cf37e969c.tar.gz caelestia-shell-3d4577044ee400fc26b0d36ee90d562cf37e969c.tar.bz2 caelestia-shell-3d4577044ee400fc26b0d36ee90d562cf37e969c.zip | |
launcher: add round style
Diffstat (limited to 'src/modules/launcher')
| -rw-r--r-- | src/modules/launcher/actions.tsx | 4 | ||||
| -rw-r--r-- | src/modules/launcher/index.tsx | 9 | ||||
| -rw-r--r-- | src/modules/launcher/modes.tsx | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/launcher/actions.tsx b/src/modules/launcher/actions.tsx index 11b07d0..e99c720 100644 --- a/src/modules/launcher/actions.tsx +++ b/src/modules/launcher/actions.tsx @@ -304,7 +304,7 @@ const Scheme = ({ scheme, name, colours }: { scheme?: string; name: string; colo const Wallpaper = ({ path, thumbnail }: IWallpaper) => ( <Gtk.FlowBoxChild visible canFocus={false}> <button - className="result" + className="result wallpaper-container" cursor="pointer" onClicked={() => { execAsync(`caelestia wallpaper -f ${path}`).catch(console.error); @@ -326,7 +326,7 @@ const Wallpaper = ({ path, thumbnail }: IWallpaper) => ( const Category = ({ path, wallpapers }: ICategory) => ( <Gtk.FlowBoxChild visible canFocus={false}> <button - className="result" + className="result wallpaper-container" cursor="pointer" onClicked={() => { execAsync(`caelestia wallpaper -d ${path}`).catch(console.error); diff --git a/src/modules/launcher/index.tsx b/src/modules/launcher/index.tsx index d355c79..b75ecce 100644 --- a/src/modules/launcher/index.tsx +++ b/src/modules/launcher/index.tsx @@ -24,7 +24,10 @@ const isAction = (text: string, action: string = "") => text.startsWith(config.a const SearchBar = ({ mode, entry }: { mode: Variable<Mode>; entry: Widget.Entry }) => ( <box className="search-bar"> - <label className="mode" label={bind(mode)} /> + <box className="mode"> + <label className="icon" label={bind(mode).as(getModeIcon)} /> + <label label={bind(mode).as(getPrettyMode)} /> + </box> {entry} </box> ); @@ -61,6 +64,7 @@ export default class Launcher extends PopupWindow { const mode = Variable<Mode>("apps"); const content = Modes(); const actions = new Actions(mode, entry); + const className = Variable.derive([mode, config.style], (m, s) => `launcher ${m} ${s}`); super({ name: "launcher", @@ -86,7 +90,8 @@ export default class Launcher extends PopupWindow { vertical halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER} - className={bind(mode).as(m => `launcher ${m}`)} + className={bind(className)} + onDestroy={() => className.drop()} > <SearchBar mode={mode} entry={entry} /> <stack diff --git a/src/modules/launcher/modes.tsx b/src/modules/launcher/modes.tsx index 0db7cd5..fd9569b 100644 --- a/src/modules/launcher/modes.tsx +++ b/src/modules/launcher/modes.tsx @@ -186,7 +186,7 @@ class Math extends Widget.Box implements LauncherContent { /> </box> </box> - <box className="separator" /> + <box visible={bind(config.style).as(s => s === "lines")} className="separator" /> </box> </revealer> ); |