Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Fix theme reset bug on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dark-steveneq committed May 11, 2024
1 parent 2d0fa0d commit c5b4c52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/fsolauncher/fsolauncher.js
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,10 @@ class FSOLauncher {

getAppropriateTheme() {
const shouldBeDark = nativeTheme.shouldUseDarkColors;
// Fix for Linux where shouldBeDark randomly changes to false out of the sudden
if ( process.platform === 'linux' && nativeTheme.themeSource === 'system' ) {
nativeTheme.themeSource = shouldBeDark ? 'dark' : 'light';
}
if ( shouldBeDark && ! this.isDarkMode() ) return 'dark';
if ( ! shouldBeDark && this.isDarkMode() ) return 'open_beta';

Expand Down

0 comments on commit c5b4c52

Please sign in to comment.