window-vibrancy icon indicating copy to clipboard operation
window-vibrancy copied to clipboard

Vibrancy while keeping macOS window border

Open probablykasper opened this issue 3 years ago • 6 comments

Pretty sure you have to make windows transparent to enable vibrancy currently. On macOS dark mode, windows have a bright border in order to better see windows. When you make a window transparent, that border is removed. Ideally there would be vibrancy while keeping the window border.

probablykasper avatar Jul 09 '22 20:07 probablykasper

Any updates or possible workarounds?

fr3fou avatar Jun 03 '24 15:06 fr3fou

Hey 👋, have you solved this problem? If you solved it, can you share the solution idea?

ayangweb avatar Jun 07 '24 03:06 ayangweb

No, but feel free to open a PR. You can investigate the code and look for macOS documentation and similar projects

probablykasper avatar Jun 07 '24 05:06 probablykasper

No, but feel free to open a PR. You can investigate the code and look for macOS documentation and similar projects

OK, I'll look for another solution

ayangweb avatar Jun 07 '24 06:06 ayangweb

found some workaround!

the bright border disappears when window background is completely transparent, so I applied tiny alpha value for ns_window.

you can use tauri 2's window effects config for vibrancy. here is an example code.

    // Window config for macOS
    #[cfg(target_os = "macos")]
    let win_builder = win_builder
        .title_bar_style(TitleBarStyle::Overlay)
        .hidden_title(true)
        .background_color(Color(0, 0, 0, 1)) // <-
        .effects(EffectsBuilder::new()
            .effects(vec![Effect::Sidebar])
            .build())
        .traffic_light_position(LogicalPosition::new(15.0, 20.0));
Image

(sorry for my bad english)

insd47 avatar Apr 20 '25 13:04 insd47

@insd47 Thanks for this! I was using window-vibrancy 0.60.

But basically you aren't using the vibrancy code correct?

rohanrehman avatar Aug 17 '25 07:08 rohanrehman