Browse Source

【综合】调整主窗口顶部栏的视图层级(消除警告)

tangchao 1 year ago
parent
commit
bb79408ea2

+ 5 - 1
PDF Office/PDF Master/Class/ChromiumTabs/src/Browser Window/CTTabWindowController.m

@@ -79,7 +79,8 @@
     [topTabStripView_ setFrame:tabFrame];
     [self.rightStripView setFrame:rightFrame];
 
-    NSView* contentParent = [[[self window] contentView] superview];
+//    NSView* contentParent = [[[self window] contentView] superview];
+    NSView* contentParent = [[self window] contentView];
     [contentParent addSubview:topTabStripView_ positioned:NSWindowBelow relativeTo:nil];
     [contentParent addSubview:self.rightStripView positioned:NSWindowAbove relativeTo:nil];
 }
@@ -91,6 +92,9 @@
 	NSRect contentFrame = [[[self window] contentView] frame];
 	contentAreaHeightDelta_ = NSHeight(contentFrame) - NSHeight(tabFrame);
 	
+    self.window.styleMask |= NSWindowStyleMaskFullSizeContentView;
+    self.window.titlebarAppearsTransparent = YES;
+    
 	if ([self hasTabStrip]) {
 		[self addTopTabStripToWindow];
 	} else {