Bug 1588747 - Always insert the TitlebarGradientView underneath its siblings. r=spohl

Usually it covers a different area than the window's ChildView. But in some cases
it can overlap with the ChildView, and in those cases, it's better if the
ChildView is on top.

Differential Revision: https://phabricator.services.mozilla.com/D49332

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-10-15 20:45:01 +00:00
Родитель 7edf88de7f
Коммит ac77a58192
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -3322,7 +3322,7 @@ static const NSString* kStateWantsTitleDrawn = @"wantsTitleDrawn";
if (needTitlebarView && !mTitlebarGradientView) {
mTitlebarGradientView = [[TitlebarGradientView alloc] initWithFrame:[self titlebarRect]];
mTitlebarGradientView.autoresizingMask = NSViewWidthSizable | NSViewMinYMargin;
[self.contentView addSubview:mTitlebarGradientView];
[self.contentView addSubview:mTitlebarGradientView positioned:NSWindowBelow relativeTo:nil];
} else if (!needTitlebarView && mTitlebarGradientView) {
[mTitlebarGradientView removeFromSuperview];
[mTitlebarGradientView release];