#[repr(C)]pub enum WindowBackgroundMaterial {
Opaque = 0,
Transparent = 1,
Sidebar = 2,
Menu = 3,
HUD = 4,
Titlebar = 5,
MicaAlt = 6,
}Expand description
Compositor blur/transparency effects for window background.
Anything but Opaque gives the window PER-PIXEL alpha on the CPU path:
the frame is cleared to transparent and whatever the content leaves at
alpha 0 shows the desktop through (a border-radius on the body makes
real rounded corners; a clip mask on the body makes any shape). The
window’s INPUT shape follows that alpha as well - clicks on fully
transparent pixels fall through to whatever is behind, on every backend
(macOS does this by itself for a non-opaque window; X11 gets an XShape,
Wayland an input region, Windows a window region). This is partial
(per-pixel) transparency, not whole-window opacity; X11 without an ARGB
visual falls back to _NET_WM_WINDOW_OPACITY, which is whole-window.
Variants§
Opaque = 0
No transparency or blur
Transparent = 1
Transparent without blur
Sidebar = 2
macOS: Sidebar material, Windows: Acrylic light
Menu = 3
macOS: Menu material, Windows: Acrylic
HUD = 4
macOS: HUD material, Windows: Acrylic dark
Titlebar = 5
macOS: Titlebar material, Windows: Mica
MicaAlt = 6
Windows: Mica Alt material
Trait Implementations§
Source§impl Clone for WindowBackgroundMaterial
impl Clone for WindowBackgroundMaterial
Source§fn clone(&self) -> WindowBackgroundMaterial
fn clone(&self) -> WindowBackgroundMaterial
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more