use theme::{Glass, Material, SurfaceStyle, Theme};
use ui::surface::{self, Surfaced as _};
div()
.rounded(px(Theme::surface_radius()))
.surface(&theme, SurfaceStyle::Material(Material::Regular))
div()
.rounded(px(Theme::surface_radius()))
.child(thumbnail)
.child(surface::layered(close_button))
.surface(&theme, SurfaceStyle::Glass(Glass::Clear))
.tint(theme.accent.opacity(0.3))- Round the element before
.surface: the blur and the lens are cut to its own corner radius..surfaceclears the element'sbg. - A surface is one scene layer, where equal draw orders render grouped by primitive kind (quads, then icons, then images). Wrap an overlay in
surface::layeredto keep it on top. - The lens needs
Window::paint_backdrop_blurfrom bezel's gpui fork (Metal and wgpu). Elsewhere, or withtheme.glassoff, the surface paints a flat tint. Gate glass-only code onsurface::lensed(&theme). - Menus, dialogs, sheets and tooltips mount on
theme.popover_surface.