I'm not too sure how to describe my issue - this part of my code:
let hud_window = match app.get_webview_window("hud") {
Some(window) => window,
None => tauri::WebviewWindowBuilder::new(&app, "hud", tauri::WebviewUrl::App("/hud".into()))
.decorations(false)
.transparent(true)
.resizable(false)
.always_on_top(true)
.skip_taskbar(true)
.center()
.min_inner_size(300.0, 80.0)
.max_inner_size(300.0, 80.0)
.inner_size(300.0, 80.0)
.build()
.map_err(|e| e.to_string())?,
};
hud_window.set_size(PhysicalSize::new(300.0, 80.0)).map_err(|e| e.to_string())?;
println!("HUD window size: {:?}", hud_window.inner_size());
Gives me:
HUD window size: Ok(LogicalSize { width: 352.0, height: 252.0 })
Why is it not setting the correct size?