class

Egui::Style

Inherits Reference < Object

Constructors

Instance methods

clone

Deep copy: clones Spacing and Visuals, copies font_size. Used by WidgetStyle#merge_over (theme style + widget overrides).

Source
font_family

Named font family (upstream Style::override_font_id's family half): a key into Context#font_families — nil = the primary #fonts stack, "monospace" → #mono_font. Rides the style cascade (theme → class rules → inline → inspector), so a rule like sheet.rule("terminal", StyleVars{"font_family" => "term"}) swaps the font of a whole widget group.

Source
font_family=(font_family : String | Nil)

Named font family (upstream Style::override_font_id's family half): a key into Context#font_families — nil = the primary #fonts stack, "monospace" → #mono_font. Rides the style cascade (theme → class rules → inline → inspector), so a rule like sheet.rule("terminal", StyleVars{"font_family" => "term"}) swaps the font of a whole widget group.

Source
font_size
Source
font_size=(font_size : Float64)
Source
font_weight

CSS font-weight: the 100..900 ladder (400 = normal, 700 = bold). No real bold faces exist — the backend synthesizes bold (double strike), so weights map by the browser rule: >= 600 renders bold, anything lighter stays normal. Rides the same cascade as font_size (theme → class rules → inline → inspector).

Source
font_weight=(font_weight : Float64)

CSS font-weight: the 100..900 ladder (400 = normal, 700 = bold). No real bold faces exist — the backend synthesizes bold (double strike), so weights map by the browser rule: >= 600 renders bold, anything lighter stays normal. Rides the same cascade as font_size (theme → class rules → inline → inspector).

Source
font_weight_bold?

The browser synthesis rule for a weight with no matching face: semibold and up (>= 600) fake bold, lighter stays normal.

Source
scroll_speed

Wheel scroll speed in pixels per wheel notch. The sokol backend reports ±1.0 per notch, so this multiplies the raw delta (touchpads send small fractional deltas, scaled the same way). Default 60 ≈ three text lines per notch. Tune per app: ctx.theme.style.scroll_speed = 100.0.

Source
scroll_speed=(scroll_speed : Float64)

Wheel scroll speed in pixels per wheel notch. The sokol backend reports ±1.0 per notch, so this multiplies the raw delta (touchpads send small fractional deltas, scaled the same way). Default 60 ≈ three text lines per notch. Tune per app: ctx.theme.style.scroll_speed = 100.0.

Source
spacing
Source
spacing=(spacing : Spacing)
Source
visuals
Source
visuals=(visuals : Visuals)
Source