Skip to main content

Module panel

Module panel 

Source
Expand description

Panel — a themed single-child container that provides a background, border, corner radius, and padding.

The equivalent of Qt’s QFrame: a visual wrapper whose chrome comes from the active PanelStyle trait implementation. The IntUI default (RecipePanelStyle) honours four [PanelVariant] presets (Plain / Sunken / Raised / Highlighted) while still accepting per-call overrides for background, border colour/width, corner radius, and padding. Apps requiring a custom surface (frosted glass, brutalist frame) supply their own impl PanelStyle per-call (.style(...)) or theme-wide via theme.style_slots.panel.

§Accessibility

Emits Role::Group by default. Call .a11y_presentational() to suppress the group node when the panel is purely decorative (e.g. a toolbar background that should not introduce a spurious container in the AT tree).

let _w = Panel::new()
    .padding(12.0)
    .child(TextWidget::new(lit!("Content")));

Structs§

Panel
A themed container with background, border, corner radius, and padding.