Improve dark mode test in wxAuiGenericTabArt
Use wxSystemSettings for this instead of manually checking the base colour components which is both more verbose/difficult and less reliable.
This commit is contained in:
committed by
Vadim Zeitlin
parent
3d33fcdba8
commit
f3d4f01513
@@ -447,9 +447,8 @@ void wxAuiGenericTabArt::DrawTab(wxDC& dc,
|
||||
int drawn_tab_yoff = border_points[1].y;
|
||||
int drawn_tab_height = border_points[0].y - border_points[1].y;
|
||||
|
||||
bool isdark = (m_baseColour.Red() < 75)
|
||||
&& (m_baseColour.Green() < 75)
|
||||
&& (m_baseColour.Blue() < 75);
|
||||
bool isdark = wxSystemSettings::GetAppearance().IsUsingDarkBackground();
|
||||
|
||||
wxColor back_color = m_baseColour;
|
||||
if (page.active)
|
||||
{
|
||||
|
Reference in New Issue
Block a user