My settings window is not draggable. I pinpointed it down to:
let settings_window = settings_window.title_bar_style(TitleBarStyle::Overlay);
With this its not longer draggable, wasen't there a solution for this which i cannot recall?
pub fn setup_settings_window<R: Runtime>(app_handle: &AppHandle<R>) -> Result<Window<R>> {
let settings_window = WindowBuilder::new(
app_handle,
crate::SETTINGS_WINDOW_LABEL,
WindowUrl::App("/pages/settings/settings.html".into()),
)
.title("Settings")
.visible(false)
.resizable(false)
.inner_size(480., 380.)
.focused(true)
.skip_taskbar(true);
#[cfg(target_os = "macos")]
let settings_window = settings_window.title_bar_style(TitleBarStyle::Overlay);
let settings_window = settings_window.build()?;
// Wait for DOM to load to avoid showing empty screen
settings_window.once("window_loaded", {
let settings_window = settings_window.clone();
move |_| {
settings_window
.show()
.expect("Failed to show settings window on load")
}
});
Ok(settings_window)
}