From fe5d47272efb922cf4e29f09b2e61b233e9255f2 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Mon, 10 Sep 2012 19:58:50 +0200 Subject: [PATCH] =?UTF-8?q?Only=20fill=20with=20=E2=80=9Cclear=20color?= =?UTF-8?q?=E2=80=9D=20for=20transparent=20themes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/OakTextView/src/OakTextView.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Frameworks/OakTextView/src/OakTextView.mm b/Frameworks/OakTextView/src/OakTextView.mm index 08ad6959..512c0cc2 100644 --- a/Frameworks/OakTextView/src/OakTextView.mm +++ b/Frameworks/OakTextView/src/OakTextView.mm @@ -581,8 +581,11 @@ static std::string shell_quote (std::vector paths) - (void)drawRect:(NSRect)aRect { - [[NSColor clearColor] set]; - NSRectFill(aRect); // Only necessary when theme uses a transparent background. + if(theme && theme->is_transparent()) + { + [[NSColor clearColor] set]; + NSRectFill(aRect); + } CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; if(!antiAlias)