Skip to content

Commit

Permalink
Merge pull request #88 from dark-steveneq/develop
Browse files Browse the repository at this point in the history
Fix theme reset bug on Linux
  • Loading branch information
ItsSim committed May 12, 2024
2 parents 2d0fa0d + c5b4c52 commit 8861824
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 8861824

Please sign in to comment.