Crate window_shadows
source · [−]Expand description
Add native shadows to your windows.
Platform support:
- Windows: Yes, but shadows can’t be turned off for a normal (decorated) window.
- macOS: Yes!
- Linux: No, shadows are controlled by the compositor installed on the user system and they can enable it for your app if they want.
Example with winit
ⓘ
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_decorations(false)
.build(&event_loop)
.unwrap();
#[cfg(any(target_os = "windows", target_os = "macos"))]
set_shadow(&window, true).unwrap();Enums
Functions
Enables or disables the shadows for a window.