sign in auth flow 👍
This commit is contained in:
@@ -1,24 +1,19 @@
|
||||
use crate::get_app_handle;
|
||||
|
||||
pub static SCENE_WINDOW_LABEL: &str = "scene";
|
||||
|
||||
pub fn overlay_fullscreen(window: &tauri::Window) -> Result<(), tauri::Error> {
|
||||
// Get the primary monitor
|
||||
let monitor = get_app_handle().primary_monitor()?.unwrap();
|
||||
let monitor_position = monitor.position();
|
||||
let monitor_size = monitor.size();
|
||||
|
||||
// Set window position to top-left
|
||||
// Get the work area (usable space, excluding menu bar/dock/notch)
|
||||
let work_area = monitor.work_area();
|
||||
// Set window position to top-left of the work area
|
||||
window.set_position(tauri::PhysicalPosition {
|
||||
x: monitor_position.x,
|
||||
y: monitor_position.y,
|
||||
x: work_area.position.x,
|
||||
y: work_area.position.y,
|
||||
})?;
|
||||
|
||||
// Set window size to match screen size
|
||||
// Set window size to match work area size
|
||||
window.set_size(tauri::PhysicalSize {
|
||||
width: monitor_size.width,
|
||||
height: monitor_size.height,
|
||||
width: work_area.size.width,
|
||||
height: work_area.size.height,
|
||||
})?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user