From 3d33fcdba85340acf0fdcb69d56d8ef27ee14ee5 Mon Sep 17 00:00:00 2001 From: Daniel Kulp Date: Mon, 13 Jul 2020 00:57:09 +0200 Subject: [PATCH] Adapt the gradient used in AUI tab art in dark mode Invert its direction and make it darker for better fit. --- src/aui/tabart.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/aui/tabart.cpp b/src/aui/tabart.cpp index e96a172b72..5c2cf2710a 100644 --- a/src/aui/tabart.cpp +++ b/src/aui/tabart.cpp @@ -281,9 +281,19 @@ void wxAuiGenericTabArt::DrawBackground(wxDC& dc, wxWindow* WXUNUSED(wnd), const wxRect& rect) { - // draw background - int topLightness = 90; - int bottomLightness = 170; + // draw background using arbitrary hard-coded, but at least adapted to dark + // mode, gradient + int topLightness, bottomLightness; + if (wxSystemSettings::GetAppearance().IsUsingDarkBackground()) + { + topLightness = 110; + bottomLightness = 90; + } + else + { + topLightness = 90; + bottomLightness = 170; + } wxColor top_color = m_baseColour.ChangeLightness(topLightness); wxColor bottom_color = m_baseColour.ChangeLightness(bottomLightness);