Skip to main content

draw_icon_btn

Function draw_icon_btn 

Source
pub fn draw_icon_btn(
    ui: &mut Ui,
    icon: &Icon,
    tooltip: &'static str,
    is_active: bool,
    size: f32,
) -> Response
Expand description

Single icon button with theme-aware rendering.

Draws a square button with:

  • Hover background
  • Active/selected background
  • Centered SVG icon with theme colors

§Arguments

  • ui - The egui UI context
  • icon - The Icon to display
  • tooltip - Hover tooltip text
  • is_active - Whether button is in active/selected state
  • size - Button size (square)

§Returns

The egui Response for click handling.