Adapt the gradient used in AUI tab art in dark mode
Invert its direction and make it darker for better fit.
This commit is contained in:
committed by
Vadim Zeitlin
parent
e12a9b11e4
commit
3d33fcdba8
@@ -281,9 +281,19 @@ void wxAuiGenericTabArt::DrawBackground(wxDC& dc,
|
|||||||
wxWindow* WXUNUSED(wnd),
|
wxWindow* WXUNUSED(wnd),
|
||||||
const wxRect& rect)
|
const wxRect& rect)
|
||||||
{
|
{
|
||||||
// draw background
|
// draw background using arbitrary hard-coded, but at least adapted to dark
|
||||||
int topLightness = 90;
|
// mode, gradient
|
||||||
int bottomLightness = 170;
|
int topLightness, bottomLightness;
|
||||||
|
if (wxSystemSettings::GetAppearance().IsUsingDarkBackground())
|
||||||
|
{
|
||||||
|
topLightness = 110;
|
||||||
|
bottomLightness = 90;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
topLightness = 90;
|
||||||
|
bottomLightness = 170;
|
||||||
|
}
|
||||||
|
|
||||||
wxColor top_color = m_baseColour.ChangeLightness(topLightness);
|
wxColor top_color = m_baseColour.ChangeLightness(topLightness);
|
||||||
wxColor bottom_color = m_baseColour.ChangeLightness(bottomLightness);
|
wxColor bottom_color = m_baseColour.ChangeLightness(bottomLightness);
|
||||||
|
Reference in New Issue
Block a user