Merge pull request #111 from NoPlagiarism/apply_blur

Change acrylic to blur on Windows
This commit is contained in:
Abdenasser Elidrissi 2024-11-13 18:44:40 +01:00 committed by GitHub
commit 7de952afe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,14 +5,14 @@
use tauri::WebviewWindow;
#[cfg(target_os = "windows")]
use window_vibrancy::apply_acrylic;
use window_vibrancy::apply_blur;
#[cfg(target_os = "macos")]
use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial, NSVisualEffectState};
/// Applies Windows-specific window effects
#[cfg(target_os = "windows")]
pub fn setup_window_effects(window: &WebviewWindow) -> Result<(), Box<dyn std::error::Error>> {
apply_acrylic(window, Some((0, 0, 25, 125)))?;
apply_blur(window, Some((0, 0, 25, 125)))?;
Ok(())
}