let primary = app.get_window("primary").unwrap();
#[cfg(target_os = "macos")]
apply_vibrancy(&primary, NSVisualEffectMaterial::HudWindow, None, None)
.expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");
#[cfg(target_os = "windows")]
{
let version = windows_version::OsVersion::current();
println!("Version: {:?}", version);
if version.major > 10 || (version.major == 10 && version.build >= 22000) {
// This is Windows 11 or newer
apply_mica(&primary, None).expect("Failed to apply mica effect");
} else if version.major == 10 {
println!("Acrylic effect");
// This is Windows 10
apply_acrylic(&primary, None).expect("Failed to apply blur effect");
} else {
apply_blur(&primary, None).expect("Failed to apply blur effect");
}
}
primary.show().unwrap();
window-vibrancy version: 0.4.3, tauri version 1.7.1
i've attached 3 images.
the first one is with mica applied (as you can see there's no transparency at all. it's just a white background)
the second one is without any effects. this confirms that the transparency on my tauri.conf.json is working as expected. third is with the acrylic effect, which is working as expected.
i'd appreciate your help with this :)