Expand description
Widgets, grouped as catalog traits on Theme — import the group, reach
the component: use ui::widgets::{Content, Controls, Layout, Scaffolding, Status}; → theme.group_box(), theme.tab(..).
What stays here is deliberately trait-shaped: state flags and pure math, neither of which reads the theme as a receiver.
Structs§
- Slider
Drag - The drag payload of a
Controls::slider, carrying the id of the slider the gesture started on. - Split
Drag - The drag payload of a
Layout::split_handle. Shipped from here so every split speaks the same type:on_drag_move::<SplitDrag>on one container would otherwise fire for an unrelated split’s gesture. - Takeover
- A flag that follows something else until the user takes it over.
Enums§
- Button
Style - The shipped looks (the reference
btnGhost/btnPrimary/btnDestructive). - Split
Style - What a
Layout::split_handlepaints.Ghostis for a pane that already draws the edge itself; the strip still takes the drag.
Constants§
- OPTION_
CARD_ HEIGHT - Default height of an
Scaffolding::option_cardpreview frame. - OPTION_
CARD_ RADIUS - Corner radius of the preview frame.
- SPLIT_
HANDLE_ HIT - Width of the divider’s grab strip: the 1px line plus zed’s own 4px of slack
each side (
workspace::HANDLE_HITBOX_SIZE) — a 1px target is unhittable.
Traits§
Functions§
- axis_
fraction - Where
pointerfalls alongaxisas a fraction ofbounds— what a divider dragged there makes the split, and what a slider dragged there makes the value.Axis::Horizontaltravels in x. - slider_
fraction - Where a slider drag lands on the track it is asked about, or
Nonewhen the gesture belongs to another slider.idis the one that element carries. - status_
dot - A small state dot — the “working / idle / failed” bead on a row. Takes the tone from the caller so the meaning stays with the caller’s domain.