Skip to main content

OVERLAY_BUTTON_PADDING

Constant OVERLAY_BUTTON_PADDING 

Source
pub(crate) const OVERLAY_BUTTON_PADDING: Vec2;
Expand description

A corner button’s inner padding, symmetric so the label is centred within the button it is grown to.

A bare [egui::Button::min_size] would leave the label sitting in a corner: the button’s atoms are aligned by the surrounding layout, which is not centred. Growing the padding instead — the same on every side — is what pushes the label to the middle of the larger button.