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):
VisualState::DISABLED: a 50% white dither washes out theWidget.VisualState::FOCUSED: a dotted outline, inset one pixel.VisualState::INDETERMINATE: a dotted horizontal bar through the middle.
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 theWidget.size- The size of the surface (theWidget’s size).state- TheWidget’s visual state.