Closed iceener closed 1 year ago
Hey! 👋
I need to make this window resizable, but whenever I try to do it, the window stops appearing on top of fullscreen apps.
Do you have any ideas how to implement this?
Extend RawNSPanel with this method:
fn set_resizable(&self) { let current_style_mask: NSWindowStyleMask = unsafe { msg_send![self, styleMask] }; let new_style_mask = current_style_mask | NSWindowStyleMask::NSWindowStyleMaskResizable; self.set_style_mask(new_style_mask.bits() as i32); }
Update init method
#[tauri::command] pub fn init_spotlight_window(app_handle: AppHandle<Wry>, window: Window<Wry>) { INIT.call_once(|| { let panel = create_spotlight_panel(&window); set_state!(app_handle, panel, Some(create_spotlight_panel(&window))); panel.set_resizable(); register_shortcut(app_handle); }); }
Cool, glad you solved it yourself!
Hey! 👋
I need to make this window resizable, but whenever I try to do it, the window stops appearing on top of fullscreen apps.
Do you have any ideas how to implement this?
Solved, I guess. The solution below seems to work.
Extend RawNSPanel with this method:
Update init method