You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix 10.12 transparent title bar, and 10.14 'transparency' issues
Change the code that sets window's backgroundColor to Mojave (10.14)
only. Right now, we are creating windows with the flag
NSWindowStyleMaskTexturedBackground which is actually deprecated, and it
had the annoying effect of auto-setting transparent title bars in Sierra
SDKs. When the previous change set the background color of the window it
also made the title bar color change as well. Now, the background color
is only set for Mojave so those earlier platforms won't be affected.
Also fix the 'transparency' setting in Mojave. Since in Mojave the
rendering is done through layers now, we need to make sure the layers
are all transparent other than the text view that's trying to blend on
top of the desktop (this is why we needed to set the window background
color to begin with). There *is* one hack where we have to set the
window background with 0.001 alpha because if you set to 0, the whole
border disappears the the window behaves sluggishly.
In the future, consider removing NSWindowStyleMaskTexturedBackground
since it's been deprecated for a while. One issue is that without it the
system title bar has this annoying gray/black line and it doesn't look
as neat. It's a minor aesthetics issue though and if in the future it
gets completely deprecated it's not a big deal. Alternatively, consider
using a transparent title bar and use customized theming.
Also, fix a regression where zoom button was not working properly in
pre-Mojave, due to [NSAnimationContext beginGrouping] being improperly
called.
Fix#799.
0 commit comments