diff --git a/CHANGELOG.md b/CHANGELOG.md index 6de00c5..7f8e107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 2026-05-16 +- fix: resetting bg color now also resets foreground/accent color ([LAC-1313](https://github.com/lacymorrow/xover/issues/3)) + ### 2024-12-19 - Feature: SVG circle demo crosshair added - Improvements: Enhanced crosshair rendering and positioning diff --git a/src/main/crossover.js b/src/main/crossover.js index 1a55ce2..32f7003 100644 --- a/src/main/crossover.js +++ b/src/main/crossover.js @@ -347,17 +347,22 @@ const syncSettings = ( options = preferences.preferences ) => { '--circle-thickness': options.crosshair.circleThickness, } - // App color is set + // App colors — highlight only applies when bg is also set; resetting bg resets highlight too - if ( options.app.appHighlightColor.charAt( 0 ) === '#' ) { + if ( options.app.appBgColor.charAt( 0 ) === '#' ) { - properties['--app-highlight-color'] = options.app.appHighlightColor + properties['--app-bg-color'] = hexToRgbA( options.app.appBgColor, APP_BACKGROUND_OPACITY ) - } + if ( options.app.appHighlightColor.charAt( 0 ) === '#' ) { - if ( options.app.appBgColor.charAt( 0 ) === '#' ) { + properties['--app-highlight-color'] = options.app.appHighlightColor - properties['--app-bg-color'] = hexToRgbA( options.app.appBgColor, APP_BACKGROUND_OPACITY ) + } + + } else if ( options.app.appHighlightColor !== 'unset' ) { + + // bg was reset to default — clear orphaned highlight color so buttons stay visible + preferences.value( 'app.appHighlightColor', 'unset' ) }