Bug 1404036: Display window titles in non-default themes when titlebars are showing on macOS. r=mstange

This commit is contained in:
Stephen A Pohl 2017-09-28 14:01:17 -04:00
Родитель b473cba84d
Коммит 152c2d3826
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -3156,10 +3156,6 @@ static const NSString* kStateCollectionBehavior = @"collectionBehavior";
if (changed) {
[self updateContentViewSize];
[self reflowTitlebarElements];
if ([self respondsToSelector:@selector(setTitleVisibility:)]) {
[self setTitleVisibility:mDrawsIntoWindowFrame ? NSWindowTitleHidden :
NSWindowTitleVisible];
}
if ([self respondsToSelector:@selector(setTitlebarAppearsTransparent:)]) {
[self setTitlebarAppearsTransparent:mDrawsIntoWindowFrame];
}
@ -3174,6 +3170,10 @@ static const NSString* kStateCollectionBehavior = @"collectionBehavior";
- (void)setWantsTitleDrawn:(BOOL)aDrawTitle
{
mDrawTitle = aDrawTitle;
if ([self respondsToSelector:@selector(setTitleVisibility:)]) {
[self setTitleVisibility:mDrawTitle ? NSWindowTitleVisible :
NSWindowTitleHidden];
}
}
- (BOOL)wantsTitleDrawn