From c58d7755a1e387bd3ef17c6b3125580e36541677 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 19 Jun 2018 21:50:34 +0200 Subject: [PATCH] Dark Mode for non native toolbar see #18146 --- src/osx/cocoa/toolbar.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index 6fbbd937b2..b37e841a6f 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -1673,7 +1673,10 @@ void wxToolBar::OnPaint(wxPaintEvent& event) wxRect rect(0,0,w,h); - dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH ); + // TODO determine whether to use flat appearance in earlier system + if ( !wxPlatformInfo::Get().CheckOSVersion(10, 14 ) ) + dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH ); + dc.SetPen( wxPen( wxColour( 0x51,0x51,0x51 ) ) ); if ( HasFlag(wxTB_LEFT) ) dc.DrawLine(w-1, 0, w-1, h);