floem-window-vibrancy

Crates.iofloem-window-vibrancy
lib.rsfloem-window-vibrancy
version0.4.3
sourcesrc
created_at2024-02-04 14:38:27.952214
updated_at2024-02-04 14:38:27.952214
descriptionMake your windows vibrant.
homepage
repositoryhttps://github.com/tauri-apps/tauri-plugin-vibrancy
max_upload_size
id1126403
size1,518,882
Lewis Carson (lewis-carson)

documentation

https://docs.rs/tauri-plugin-vibrancy

README

window-vibrancy

Chat Server

Make your windows vibrant.

Platform-specific

  • Linux: Unsupported, Blur and any vibrancy effects are controlled by the compositor installed on the end-user system.

Example

use window_vibrancy::{apply_blur, apply_vibrancy, NSVisualEffectMaterial};

#[cfg(target_os = "macos")]
apply_vibrancy(&window, NSVisualEffectMaterial::HudWindow, None, None).expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");

#[cfg(target_os = "windows")]
apply_blur(&window, Some((18, 18, 18, 125))).expect("Unsupported platform! 'apply_blur' is only supported on Windows");

Tauri

if you are using tauri, don't forget to:

For a more complete example of usage with tauri, see examples/tauri.

Available functions

Function Supported platforms Notes
apply_blur&clear_blur Windows 7/10/11 (22H1 only) Bad performance when resizing/dragging the window on Windows 11 build 22621.
apply_acrylic&clear_acrylic Windows 10/11 Bad performance when resizing/dragging the window on Windows 10 v1903+ and Windows 11 build 22000.
apply_mica&clear_mica Windows 11
apply_vibrancy macOS 10.10 and newer

Screenshots

apply_blur apply_acrylic apply_mica apply_vibrancy
apply_blur screenshot apply_blur screenshot apply_mica screenshot apply_vibrancy screenshot

Commit count: 124

cargo fmt