✨ feat(bar/animations): add scale animation on apps button, fade animation on ws numbers
This commit is contained in:
@@ -7,11 +7,12 @@ export function Apps(): Gtk.Widget {
|
||||
onClickRelease: () => Windows.getWindow("apps-window")?.show(),
|
||||
className: "apps",
|
||||
child: new Widget.Box({
|
||||
child: new Widget.Label({
|
||||
className: "nf",
|
||||
child: new Widget.Icon({
|
||||
tooltipText: tr("bar.apps.tooltip"),
|
||||
label: ""
|
||||
} as Widget.LabelProps)
|
||||
icon: "applications-other-symbolic",
|
||||
halign: Gtk.Align.CENTER,
|
||||
hexpand: true
|
||||
} as Widget.IconProps)
|
||||
} as Widget.BoxProps)
|
||||
} as Widget.EventBoxProps);
|
||||
}
|
||||
|
||||
@@ -19,8 +19,12 @@ export function Workspaces(): Gtk.Widget {
|
||||
|
||||
return sortedWorkspaces.map((workspace: AstalHyprland.Workspace) =>
|
||||
new Widget.Button({
|
||||
className: bind(hyprland, "focusedWorkspace").as(
|
||||
(focusedWs: AstalHyprland.Workspace) => workspace.id === focusedWs.id ? "focus" : ""),
|
||||
className: Variable.derive([
|
||||
bind(hyprland, "focusedWorkspace"),
|
||||
showWorkspaceNumbers()
|
||||
], (focusedWs, showWsNumbers) =>
|
||||
`${focusedWs.id === workspace.id ? "focus" : ""} ${showWsNumbers ? "show" : ""}`
|
||||
)(),
|
||||
visible: true,
|
||||
tooltipText: bind(workspace, "lastClient").as((lastClient) => `Workspace ${workspace.id}${ lastClient ? ` - ${
|
||||
!lastClient.title.toLowerCase().includes(lastClient.class) ?
|
||||
|
||||
@@ -29,7 +29,7 @@ export const NotifHistory: Gtk.Widget = new Widget.Box({
|
||||
valign: Gtk.Align.START,
|
||||
children: bind(Notifications.getDefault(), "history").as((history: Array<HistoryNotification>) =>
|
||||
history.map((notification: HistoryNotification) => NotificationWidget(notification,
|
||||
() => Notifications.getDefault().removeHistory(notification.id))
|
||||
() => Notifications.getDefault().removeHistory(notification.id), true)
|
||||
))
|
||||
} as Widget.BoxProps)
|
||||
} as Widget.ScrollableProps),
|
||||
|
||||
Reference in New Issue
Block a user