mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge pull request #917 from ychin/transparent-titlebar-pre-mojave
Make MMTitlebarAppearsTransparent option work on pre-Mojave
This commit is contained in:
@@ -591,7 +591,26 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// 10.13 or below. As noted above, the window flag
|
||||
// NSWindowStyleMaskTexturedBackground doesn't play well with window color,
|
||||
// but if we are toggling the titlebar transparent option, we need to set
|
||||
// the window background color in order the title bar to be tinted correctly.
|
||||
if ([[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMTitlebarAppearsTransparentKey]) {
|
||||
if ([back alphaComponent] != 0) {
|
||||
[decoratedWindow setBackgroundColor:back];
|
||||
} else {
|
||||
// See above HACK for more details. Basically we cannot set a
|
||||
// color with 0 alpha or the window manager will give it a
|
||||
// different treatment.
|
||||
NSColor *clearColor = [back colorWithAlphaComponent:0.001];
|
||||
[decoratedWindow setBackgroundColor:clearColor];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[vimView setDefaultColorsBackground:back foreground:fore];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user