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:340
Cases
case theme
The theme's opaque background. The default, and the only thing a windowed app should want.
Sources/LavaUI/Theme.swift:343
case color(Color)
A specific colour, which may be translucent.
Sources/LavaUI/Theme.swift:345
case none
Nothing at all — the surface stays as the frame was cleared.
Sources/LavaUI/Theme.swift:347
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:354
Properties
var compositorBlurRadius: Float { get }
Layout pixels the compositor should frost behind this window. 0 = off.
Sources/LavaUI/Theme.swift:378
nonisolated(unsafe) static var current: WindowBackdrop
What every window paints behind its content. Read on every frame, so a change shows on the next redraw.
Sources/LavaUI/Theme.swift:357
var fill: Color? { get }
The colour to fill the window with, or nil to fill nothing.
Sources/LavaUI/Theme.swift:368
var showsDesktop: Bool { get }
Whether what shows behind a translucent view is the desktop rather
than something this window painted — so a .backdropBlur view, in a
client of the compositor, asks the compositor to frost its rectangle
instead of capturing this window's own framebuffer, which is empty
there. The panel, the dock and their popups (.none); a translucent
colour, too.
Not .blur: that window is frosted edge to edge already, by the same
plates a region would replace.
Sources/LavaUI/Theme.swift:394
Methods
static func blur(radius: Float) -> WindowBackdrop
Frosted glass with a dark wash that still lets the desktop through.
Sources/LavaUI/Theme.swift:360