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

Fix logic behind Mac theme variant inference #1109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remi6397
Copy link

The previous implementation could never possibly work, because every set background=… changes effectiveAppearance of MMVimView and therefore overrides the global value as set in the Preferences.app. In short, it essentially becomes just a mirror of background variable. 😛

I'm none of a Cocoa expert, but this patch (derived from an SO answer) works just right for me.

@eirnym
Copy link
Contributor

eirnym commented Oct 27, 2020

Thanks you for a patch, @remi6397

Have you checked other manual options other than automatic in preferences?

one of the option is to set dark mode depending on a Vim setting. This will be applied to a window, without touching the rest app windows

@remi6397
Copy link
Author

@eirnym

one of the option is to set dark mode depending on a Vim setting. This will be applied to a window, without touching the rest app windows

That was the one causing troubles. I could've just changed that setting and leave it as it is, but this all is more about not causing similar headaches to other users ;)

I'd realized that this fix prevents MacVim from building on ancient XCode versions, so I'll probably have to wrap it in conditionals, right?

@eirnym
Copy link
Contributor

eirnym commented Oct 27, 2020

I use this option as in some windows I have "background" option set to dark, in others, to light depending on a theme and project I do at the moment. When I see a light interface with dark window or dark interface with light window, it's a bit odd for me. Browser is the only exception from this rule as I have only one window visible on a screen, while I have usually 3-6 windows of MacVim while I'm working.

previously I used fixed theme variant for a window independent of macOS option to match my theme.

Following screenshots are for the reference

Zrzut ekranu 2020-10-27 o 20 24 18

@ychin
Copy link
Member

ychin commented Oct 27, 2020

Sorry i haven’t looked at this PR yet. I’ll take a look later today.

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.

3 participants