iced::widget

Function hover

Source
pub fn hover<'a, Message, Theme, Renderer>(
    base: impl Into<Element<'a, Message, Theme, Renderer>>,
    top: impl Into<Element<'a, Message, Theme, Renderer>>,
) -> Element<'a, Message, Theme, Renderer>
where Message: 'a, Theme: 'a, Renderer: Renderer + 'a,
Expand description

Displays a widget on top of another one, only when the base widget is hovered.

This works analogously to a stack, but it will only display the layer on top when the cursor is over the base. It can be useful for removing visual clutter.