Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set window border radius in tauri apps

How can I round the corners of a Tauri application window? I've tried several approaches, but none seem to work. Any help would be appreciated.

like image 682
mvioole Avatar asked Mar 13 '26 14:03

mvioole


1 Answers

Warning: MacOS Only

I'm gonna leave this here for anyone using Vibrancy plugin, there is a method to do this, it's just not documented well enough. I had to dig to find it, and it's simple

 apply_vibrancy(&spotlight_window, NSVisualEffectMaterial::HudWindow, None, Some(16.0))
        .expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");

Some(16.0) is key here. that's the roundness value in pixels.

like image 87
gaandurian Avatar answered Mar 15 '26 03:03

gaandurian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!