Prevent theme flashing on initial window load (#115)

This commit is contained in:
Gregory Schier
2024-09-25 14:01:24 -07:00
committed by GitHub
parent b19748c42e
commit 598bbd6f69
4 changed files with 15 additions and 8 deletions

View File

@@ -2014,6 +2014,7 @@ fn create_window(handle: &AppHandle, config: CreateWindowConfig) -> WebviewWindo
tauri::WebviewWindowBuilder::new(handle, config.label, WebviewUrl::App(config.url.into()))
.title(config.title)
.resizable(true)
.visible(false) // To prevent theme flashing, the frontend code calls show() immediately after configuring the theme
.fullscreen(false)
.disable_drag_drop_handler() // Required for frontend Dnd on windows
.inner_size(config.inner_size.0, config.inner_size.1)