💥 fix: correctly use centerbox with gtkbuilder types, fix styles
also re-added some windows to the windows list(they were causing issues before)
This commit is contained in:
@@ -19,7 +19,7 @@ export const FocusedClient = () => {
|
||||
getSymbolicIcon(clss) ?? getAppIcon(clss) ??
|
||||
getAppIcon(focusedClient.initialClass) ??
|
||||
"application-x-executable-symbolic")
|
||||
} css={"font-size: 18px;"} vexpand={true} />
|
||||
} vexpand={true} />
|
||||
|
||||
<Gtk.Box valign={Gtk.Align.CENTER} class={"text-content"}
|
||||
orientation={Gtk.Orientation.VERTICAL}>
|
||||
@@ -30,8 +30,8 @@ export const FocusedClient = () => {
|
||||
tooltipText={createBinding(focusedClient, "class")}/>
|
||||
<Gtk.Label class={"title"} xalign={0} maxWidthChars={50}
|
||||
ellipsize={Pango.EllipsizeMode.END}
|
||||
label={createBinding(focusedClient, "class")}
|
||||
tooltipText={createBinding(focusedClient, "class")}/>
|
||||
label={createBinding(focusedClient, "title")}
|
||||
tooltipText={createBinding(focusedClient, "title")}/>
|
||||
</Gtk.Box>
|
||||
</Gtk.Box>}
|
||||
</With>
|
||||
|
||||
@@ -18,7 +18,7 @@ export let [player, setPlayer] = createState(dummyPlayer);
|
||||
export const Media = () => {
|
||||
const connections: Map<GObject.Object, Array<number>|number> = new Map();
|
||||
|
||||
if(AstalMpris.get_default().players[0] && player.get() !== dummyPlayer)
|
||||
if(AstalMpris.get_default().players[0])
|
||||
setPlayer(AstalMpris.get_default().players[0]);
|
||||
|
||||
connections.set(AstalMpris.get_default(), [
|
||||
@@ -26,9 +26,6 @@ export const Media = () => {
|
||||
player.available && setPlayer(player)),
|
||||
|
||||
AstalMpris.get_default().connect("player-closed", (_, closedPlayer) => {
|
||||
if(player.get()?.busName !== closedPlayer.busName)
|
||||
return;
|
||||
|
||||
const players = AstalMpris.get_default().players.filter(pl => pl?.available);
|
||||
|
||||
if(players.length > 0) {
|
||||
@@ -113,7 +110,7 @@ export const Media = () => {
|
||||
title ?? "No Title")} maxWidthChars={20} ellipsize={Pango.EllipsizeMode.END}
|
||||
/>
|
||||
<Separator orientation={Gtk.Orientation.HORIZONTAL} size={1} margin={5}
|
||||
alpha={.3} />
|
||||
alpha={.3} spacing={6} />
|
||||
<Gtk.Label class={"artist"} label={createBinding(player.get(), "artist").as(artist =>
|
||||
artist ?? "No Artist")} maxWidthChars={18} ellipsize={Pango.EllipsizeMode.END}
|
||||
/>
|
||||
|
||||
@@ -19,7 +19,7 @@ function popoverFromModel(model: Gio.MenuModel, actionGroup: Gio.ActionGroup | n
|
||||
export const Tray = () => {
|
||||
const items = createBinding(astalTray, "items").as(items => items.filter(item => item?.gicon));
|
||||
|
||||
return <Gtk.Box class={"tray"} visible={variableToBoolean(items)}>
|
||||
return <Gtk.Box class={"tray"} visible={variableToBoolean(items)} spacing={10}>
|
||||
<For each={items}>
|
||||
{(item: AstalTray.TrayItem) => <Gtk.Box class={"item"}>
|
||||
|
||||
|
||||
@@ -114,18 +114,18 @@ export const Workspaces = () => {
|
||||
`${lastClient.get_class()}: `
|
||||
: ""
|
||||
} ${lastClient.title}` : "" }`
|
||||
)} onClicked={ws.focus}>
|
||||
)} onClicked={() => ws.focus()}>
|
||||
|
||||
|
||||
<With value={createBinding(ws, "lastClient")}>
|
||||
{(lastClient: AstalHyprland.Client) =>
|
||||
<Gtk.Box class={"last-client"}>
|
||||
<Gtk.Box class={"last-client"} hexpand>
|
||||
<Gtk.Revealer transitionDuration={200} revealChild={showId}
|
||||
transitionType={Gtk.RevealerTransitionType.SLIDE_LEFT}
|
||||
hexpand={true}>
|
||||
hexpand>
|
||||
|
||||
<Gtk.Label label={createBinding(ws, "id").as(String)}
|
||||
class={"id"} />
|
||||
class={"id"} hexpand />
|
||||
</Gtk.Revealer>
|
||||
{lastClient && <Gtk.Image class={"last-client-icon"} iconName={
|
||||
createBinding(lastClient, "initialClass").as(initialClass =>
|
||||
|
||||
Reference in New Issue
Block a user