@@ -362,7 +362,7 @@ const syncSettings = ( options = preferences.preferences ) => {
362362 }
363363
364364 // SVG customizations enabled
365- if ( ! checkboxTrue ( options . crosshair . svgCustomization , 'svgCustomization' ) ) {
365+ if ( checkboxTrue ( options . crosshair . svgCustomization , 'svgCustomization' ) ) {
366366
367367 properties [ '--svg-fill-color' ] = options . crosshair . fillColor
368368 properties [ '--svg-stroke-color' ] = options . crosshair . strokeColor
@@ -457,7 +457,7 @@ const initShadowWindow = async () => {
457457 '--circle-thickness' : previousPreferences . crosshair ?. circleThickness ,
458458 }
459459
460- if ( ! checkboxTrue ( previousPreferences . crosshair ?. svgCustomization , 'svgCustomization' ) ) {
460+ if ( checkboxTrue ( previousPreferences . crosshair ?. svgCustomization , 'svgCustomization' ) ) {
461461
462462 properties [ '--svg-fill-color' ] = previousPreferences . crosshair ?. fillColor
463463 properties [ '--svg-stroke-color' ] = previousPreferences . crosshair ?. strokeColor
@@ -562,29 +562,13 @@ const openSettingsWindow = async () => {
562562 } )
563563
564564 // Force opening URLs in the default browser (remember to use `target="_blank"`)
565- // Todo: remove this check when updating to electron 12, this is to allow 11/12 compatibility
566- if ( typeof windows . preferencesWindow . webContents . setWindowOpenHandler === 'function' ) {
565+ windows . preferencesWindow . webContents . setWindowOpenHandler ( details => {
567566
568- // Electron 12+
569- windows . preferencesWindow . webContents . setWindowOpenHandler ( details => {
567+ shell . openExternal ( details . url )
570568
571- shell . openExternal ( details . url )
569+ return { action : 'deny' }
572570
573- return { action : 'deny' }
574-
575- } )
576-
577- } else {
578-
579- // Electron 11
580- windows . preferencesWindow . webContents . on ( 'new-window' , ( event , url ) => {
581-
582- event . preventDefault ( )
583- shell . openExternal ( url )
584-
585- } )
586-
587- }
571+ } )
588572
589573 // Track window state
590574 windows . preferencesWindow . on ( 'closed' , ( ) => {
@@ -598,9 +582,10 @@ const openSettingsWindow = async () => {
598582 const newBounds = { x : mainBounds . x + mainBounds . width + 1 , y : mainBounds . y + mainBounds . height + 1 }
599583 windows . safeSetBounds ( windows . preferencesWindow , newBounds )
600584
585+ // Keep settings on top of everything else
601586 // Values include normal, floating, torn-off-menu, modal-panel, main-menu, status, pop-up-menu, screen-saver
602- windows . preferencesWindow . setVisibleOnAllWorkspaces ( true , { visibleOnFullScreen : true } )
603- windows . preferencesWindow . setAlwaysOnTop ( true , 'screen-saver' )
587+ // windows.preferencesWindow.setVisibleOnAllWorkspaces( true, { visibleOnFullScreen: true } )
588+ // windows.preferencesWindow.setAlwaysOnTop( true, 'screen-saver' )
604589 windows . preferencesWindow . focus ( )
605590
606591 preferences . value ( 'hidden.showSettings' , true )
0 commit comments