Files
Ely-GPUI-Components/src/theme/messaging.rs
T
ZacharyZhang-NY 1700a72753 Messaging · Stickers and GIFs: a sticker picker and a GIF picker
StickerPicker shows stickers a pack at a time, chosen above with a
segmented control; a search spans every pack and keeps the stickers
whose names hold it. Arrows move, Enter or a press picks. It reuses the
glyph grid, now forms::picks, which takes its columns and cell size and
titles from the host, so emoji, icons and stickers share one searchable
grid; forms::glyphs keeps the emoji and icon pickers.

GifPicker packs host GIFs in two columns, each moving, under a search
it owns; the host hears the trimmed words only when they change, and
categories fill the search while it is empty. Waiting, it shows tiles
in GIF shapes; finding nothing, it says so. Each GIF is a Tab stop that
a press, Enter or Space picks.

The share toggle now shows its state, as the microphone and camera do.
The gallery ships line-drawn stickers and small GIFs made from its own
pictures.
2026-09-26 23:00:15 -04:00

25 lines
616 B
Rust

use gpui::Rems;
use super::{Theme, tokens::px_to_rems};
/// Messaging's measures.
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MessagingSizes {
/// A call's strip of tiles beside a shared screen, wide.
pub tiles: Rems,
/// A call's tile at its narrowest, before a grid drops a column.
pub tile: Rems,
/// A sticker's cell in a picker, square.
pub sticker: Rems,
}
impl Theme {
pub fn messaging(&self) -> MessagingSizes {
MessagingSizes {
tiles: px_to_rems(200.0),
tile: px_to_rems(160.0),
sticker: px_to_rems(64.0),
}
}
}