Skip to content

Commit 90a475e

Browse files
committed
auto commit
1 parent 3b61493 commit 90a475e

5 files changed

Lines changed: 15 additions & 30 deletions

File tree

src/main/crossover.js

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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 )

src/main/preferences.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { DEFAULT_THEME, FILE_FILTERS, SETTINGS_WINDOW_DEVTOOLS, SUPPORTED_IMAGE_F
66
/* Via https://github.com/tkambler/electron-preferences */
77

88
const browserWindowOverrides = {
9-
alwaysOnTop: true,
9+
alwaysOnTop: false,
1010
title: 'CrossOver Preferences',
1111
// width: 600,
1212
// height: 400,

src/renderer/styles/dist/index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/styles/dist/index.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)