Repository navigation
gpuicn v0.9.5
gpuicn v0.9.5
Two more requests from Matty: a clickable author name on messages, and toasts
that tell the app when they leave. Everything is additive; the runtime pins
are unchanged: GPUI Kit 0.9.0 on gpui-pre 0.3.11 and gpui-icons 0.6.0.
Added
- Message: the author name can open something, such as a profile card
(#123).on_author_click(handler)draws the name as a link-styled button that
takes focus with Tab, runs on click, Enter or Space and underlines on
hover. The handler gets the click and the name's bounds in window
coordinates, to anchor a popover.author_element(element)puts your own element in place of the name,
such as thehover_popovertrigger you already wrap around the avatar.
It inherits the name's weight, size and color.- Both work in standard and compact density.
- Toast: the app can follow a notification's life (#122).
Notice::on_dismiss(handler)runs once when a notice starts to leave,
with aNoticeDismissal:Action,Cancel(such as "Later"),Close,
Timeout,Dismissed(the app calleddismiss) orReplaced(the app
pushed the same ID again).NoticeDismissal::by_readeris true for Cancel
and Close. The handler runs after the current update, so it may push
again.ToastState::contains(id)says whether a notice is queued or on screen
and not already leaving.ToastState::set_placement(ToastPlacement)moves the stack to any corner
or the middle of the top or bottom edge (bottom left stays the default),
andset_inset(horizontal, vertical)sets its distance from the window
edges, such as to clear a composer.
Upgrading
cargo install gpuicn-cli --version 0.9.5 --locked
gpuicn update --to 0.9.5Crate users: cargo update -p gpuicn.