macvim icon indicating copy to clipboard operation
macvim copied to clipboard

Fix logic behind Mac theme variant inference

Open remi6397 opened this issue 5 years ago • 4 comments

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.

remi6397 avatar Oct 16 '20 19:10 remi6397

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

eirnym avatar Oct 27 '20 07:10 eirnym

@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?

remi6397 avatar Oct 27 '20 18:10 remi6397

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

eirnym avatar Oct 27 '20 19:10 eirnym

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

ychin avatar Oct 27 '20 19:10 ychin