Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine system appearance and dark mode settings #1637

Merged
merged 6 commits into from
May 15, 2021

Conversation

mquevill
Copy link
Collaborator

The api.nativeTheme should work for non-MacOS platforms. This PR combines the followSystemAppearance and darkMode settings into a 'theme' configuration setting, which mirrors the api.nativeTheme.themeSource variable. However, setting the 'dark' or 'light' mode should override the system settings.

I'm not sure if removing the darkTheme, which is supposed to force dark mode with some GTK+3 environments, is okay. It could cause some issues with those environments that rely on this configuration.

The theme only updates when you click on the window, but I don't think it should be constantly checking while Caprine is in the background.

Tested on:

  • Windows 10, build 19042
  • Linux Mint 20.1, Cinnamon DE

source/browser.ts Outdated Show resolved Hide resolved
source/menu.ts Outdated Show resolved Hide resolved
source/index.ts Show resolved Hide resolved
source/index.ts Outdated Show resolved Hide resolved
@dusansimic dusansimic self-requested a review May 14, 2021 13:46
@sindresorhus sindresorhus merged commit 4757824 into sindresorhus:main May 15, 2021
@mquevill mquevill deleted the FollowSystem branch July 21, 2021 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants