@@ -146,32 +146,26 @@ pub fn create_recording_overlay(app_handle: &AppHandle) {
146146 if let Some ( ( x, y) ) = calculate_overlay_position ( app_handle) {
147147 // PanelBuilder creates a Tauri window then converts it to NSPanel.
148148 // The window remains registered, so get_webview_window() still works.
149- match PanelBuilder :: < _ , RecordingOverlayPanel > :: new (
150- app_handle,
151- "recording_overlay"
152- )
153- . url ( WebviewUrl :: App ( "src/overlay/index.html" . into ( ) ) )
154- . title ( "Recording" )
155- . position ( tauri:: Position :: Logical ( tauri:: LogicalPosition { x, y } ) )
156- . level ( PanelLevel :: Status )
157- . size ( tauri:: Size :: Logical ( tauri:: LogicalSize {
158- width : OVERLAY_WIDTH ,
159- height : OVERLAY_HEIGHT
160- } ) )
161- . has_shadow ( false )
162- . transparent ( true )
163- . no_activate ( true )
164- . corner_radius ( 0.0 )
165- . with_window ( |w| {
166- w. decorations ( false )
167- . transparent ( true )
168- } )
169- . collection_behavior (
170- CollectionBehavior :: new ( )
171- . can_join_all_spaces ( )
172- . full_screen_auxiliary ( )
173- )
174- . build ( )
149+ match PanelBuilder :: < _ , RecordingOverlayPanel > :: new ( app_handle, "recording_overlay" )
150+ . url ( WebviewUrl :: App ( "src/overlay/index.html" . into ( ) ) )
151+ . title ( "Recording" )
152+ . position ( tauri:: Position :: Logical ( tauri:: LogicalPosition { x, y } ) )
153+ . level ( PanelLevel :: Status )
154+ . size ( tauri:: Size :: Logical ( tauri:: LogicalSize {
155+ width : OVERLAY_WIDTH ,
156+ height : OVERLAY_HEIGHT ,
157+ } ) )
158+ . has_shadow ( false )
159+ . transparent ( true )
160+ . no_activate ( true )
161+ . corner_radius ( 0.0 )
162+ . with_window ( |w| w. decorations ( false ) . transparent ( true ) )
163+ . collection_behavior (
164+ CollectionBehavior :: new ( )
165+ . can_join_all_spaces ( )
166+ . full_screen_auxiliary ( ) ,
167+ )
168+ . build ( )
175169 {
176170 Ok ( panel) => {
177171 let _ = panel. hide ( ) ;
@@ -194,7 +188,8 @@ pub fn show_recording_overlay(app_handle: &AppHandle) {
194188 if let Some ( overlay_window) = app_handle. get_webview_window ( "recording_overlay" ) {
195189 // Update position before showing to prevent flicker from position changes
196190 if let Some ( ( x, y) ) = calculate_overlay_position ( app_handle) {
197- let _ = overlay_window. set_position ( tauri:: Position :: Logical ( tauri:: LogicalPosition { x, y } ) ) ;
191+ let _ = overlay_window
192+ . set_position ( tauri:: Position :: Logical ( tauri:: LogicalPosition { x, y } ) ) ;
198193 }
199194
200195 let _ = overlay_window. show ( ) ;
0 commit comments