struct

Egui::StyleProp

Inherits Struct < Value < Object

A stylable property declaration: the StyleVars key a widget actually reads, plus how to edit it. Widgets declare their own lists (Widget#style_properties) — the inspector is generic and builds its editors purely from these declarations.

Constructors

new(key : String, kind : Symbol, label : String | Nil = nil, states : Bool = false, fallback : StyleValue | Nil = nil, min : Float64 | Nil = nil)
Source

Instance methods

fallback

The widget's own hardcoded default for the key (what #ui passes to vars.f64(key, …) when neither class rules nor theme define it) — the inspector shows it as the value while unset, instead of a bogus 0.

Source
kind

:color | :number | :box | :bool | :string — picks the inspector editor.

Source
label
Source
min

Lower bound for :number keys the value makes no sense below (font_size, rounding, blur…): the inspector's number editor clamps edits to it. nil = unclamped (offsets, spreads — negatives are legitimate CSS there).

Source
states?

True when the key also makes sense as a :hover/:active state overlay (button fills, bevels, shadows) — the inspector then offers the base/hover/active switch for it.

Source