pub fn bar_button(icon: &'static str, diameter: f32, tint: Hsla) -> DivExpand description
A circular control inside a bar: the ring, and its glyph at half the
diameter. diameter is a parameter because a transport’s primary action is
deliberately bigger than its neighbours — that size difference is what makes
the cluster readable at a glance.
It builds the icon rather than taking one, the way row_tile
does, because tint is not optional in the way it looks: gpui reads an
svg’s colour off that element’s own style and paints nothing when it is
unset, so a colour set on this button would silently not reach the glyph.
Caller adds id, click and its own .hover(..): gpui panics on a second
hover call, and the wash differs by state (a lit toggle is not a resting
one). Theme::glass_hover is the wash to reach for.