From 08d8d69f2e464759045c31d7413bc8100a4a8109 Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Wed, 30 Jan 2013 00:28:19 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20occasional=20=E2=80=9Ctoo=20light?= =?UTF-8?q?=E2=80=9D=20title=20bar=20gradient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This would mainly happen when creating new windows with a file browser. Described at: http://stackoverflow.com/questions/5812593/nswindow-textured-gradient-fill-weirdness http://stackoverflow.com/questions/7795505/nswindow-textured-background-with-nstextfield/11482772#11482772 --- Frameworks/DocumentWindow/src/DocumentController.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Frameworks/DocumentWindow/src/DocumentController.mm b/Frameworks/DocumentWindow/src/DocumentController.mm index 27f79885..34deac53 100644 --- a/Frameworks/DocumentWindow/src/DocumentController.mm +++ b/Frameworks/DocumentWindow/src/DocumentController.mm @@ -240,6 +240,10 @@ namespace self.window.contentView = self.layoutView; self.window.delegate = self; self.window.releasedWhenClosed = NO; + [self.window setContentBorderThickness:0 forEdge:NSMaxYEdge]; // top border + [self.window setContentBorderThickness:0 forEdge:NSMinYEdge]; // bottom border + [self.window setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge]; + [self.window setAutorecalculatesContentBorderThickness:NO forEdge:NSMinYEdge]; [self.window bind:@"title" toObject:self withKeyPath:@"windowTitle" options:nil]; [self.window bind:@"documentEdited" toObject:self withKeyPath:@"isDocumentEdited" options:nil];