From b3d46711be253862ee73d8ed88e00eef129abbf8 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 21 Apr 2020 09:45:43 +0200 Subject: Slightly improve drawing of window titlebars. --- src/Fl_cocoa.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 7ae551263..aded8cb4e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -4377,8 +4377,10 @@ void Fl_Cocoa_Window_Driver::draw_layer_to_context(CALayer *layer, CGContextRef #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 CGContextSaveGState(gc); clip_to_rounded_corners(gc, w, h); - CGContextSetRGBFillColor(gc, .79, .79, .79, 1.); // equiv. to FL_DARK1 - CGContextFillRect(gc, CGRectMake(0, 0, w, h)); + if (fl_mac_os_version < 101500) { // exact OS threshold might be lower + CGContextSetRGBFillColor(gc, .79, .79, .79, 1.); // equiv. to FL_DARK1 + CGContextFillRect(gc, CGRectMake(0, 0, w, h)); + } CGContextSetShouldAntialias(gc, true); [layer renderInContext:gc]; // 10.5 CGContextRestoreGState(gc); -- cgit v1.2.3