Skip to content

How to make a window blurry? win10/11 #7224

Answered by ohnjec
ohnjec asked this question in Q&A
Discussion options

You must be logged in to vote

Answer:

add this dependency to cargo.toml, make sure it's the same version as the slint dependency

i-slint-backend-winit = "1.8.0"

and add this code to main.rs

ui.window().with_winit_window(|winit_win: &i_slint_backend_winit::winit::window::Window| {
    winit_win.set_system_backdrop(TransientWindow);
    // replace 'ui' with whatever variable you use to declare the window with
});

Links that helped me:
https://docs.rs/winit/latest/winit/platform/windows/trait.WindowAttributesExtWindows.html#tymethod.with_system_backdrop
https://docs.rs/winit/latest/winit/platform/windows/enum.BackdropType.html

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ogoffart
Comment options

Answer selected by ohnjec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants