Skip to main content

state_overlay

Function state_overlay 

Source
pub fn state_overlay(p: &mut dyn Painter, size: Size, state: VisualState)
Expand description

Draws the generic look of a Widget’s visual state on top of what its paint drew.

Call it after paint (the WidgetCache does this for every Widget):

The other states (PRESSED, CHECKED, HOVERED, DRAG_OVER) are drawn by the Widget, since their look depends on what the Widget is.

§Arguments

  • p - The painter, targeting the Widget.
  • size - The size of the surface (the Widget’s size).
  • state - The Widget’s visual state.