LavaUI docs

enum WindowBackdrop

Swift

enum WindowBackdrop

What a window paints behind its content, before anything in the tree.

Its own type rather than a Theme field because it is not a colour choice, it is a statement about the window: whether the surface underneath the UI is opaque, translucent, or absent.

A windowed app never touches this — .theme is what every one of them has always drawn. A compositor surface is composited by somebody else rather than pasted onto a swapchain, so it can be any of the three, and .none is what a rounded corner or a drop shadow needs: both depend on the parts nothing was drawn over staying empty rather than becoming black.

Sources/LavaUI/Theme.swift:315

Cases

case theme

The theme's opaque background. The default, and the only thing a windowed app should want.

Sources/LavaUI/Theme.swift:318

case color(Color)

A specific colour, which may be translucent.

Sources/LavaUI/Theme.swift:320

case none

Nothing at all — the surface stays as the frame was cleared.

Sources/LavaUI/Theme.swift:322

case blur(radius: Float, tint: Color)

Frost the desktop behind the window, then this translucent tint.

Only the compositor can see what is under the window, so this is a no-op in a windowed app (the tint still paints). radius 0 is .color(tint). An opaque tint hides the frost completely — the useful alphas are well below 1; see docs/colour-and-blending.md.

Sources/LavaUI/Theme.swift:329

Properties

var compositorBlurRadius: Float { get }

Layout pixels the compositor should frost behind this window. 0 = off.

Sources/LavaUI/Theme.swift:352

nonisolated(unsafe) static var current: WindowBackdrop

Not documented.

Sources/LavaUI/Theme.swift:331

var fill: Color? { get }

The colour to fill the window with, or nil to fill nothing.

Sources/LavaUI/Theme.swift:342

Methods

static func blur(radius: Float) -> WindowBackdrop

Frosted glass with a dark wash that still lets the desktop through.

Sources/LavaUI/Theme.swift:334