Set tab label colour in AUI native MSW tab art
We must always change the text colour when using non-default background colour, as otherwise the text may become unreadable in some themes, which was exactly what happened in the standard "High contrast" theme when using wxAUI under MSW before. Closes https://github.com/wxWidgets/wxWidgets/pull/1989 Closes #18832.
This commit is contained in:
parent
1a4eff90ae
commit
70659b6b7c
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
|
#include "wx/settings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/aui/tabart.h"
|
#include "wx/aui/tabart.h"
|
||||||
@ -213,6 +214,7 @@ void wxAuiMSWTabArt::DrawTab(wxDC& dc,
|
|||||||
textRect.width -= m_closeBtnSize.x + wnd->FromDIP(3);
|
textRect.width -= m_closeBtnSize.x + wnd->FromDIP(3);
|
||||||
|
|
||||||
dc.SetFont(wnd->GetFont());
|
dc.SetFont(wnd->GetFont());
|
||||||
|
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
|
||||||
dc.DrawLabel(page.caption, page.bitmap, textRect, wxALIGN_CENTRE);
|
dc.DrawLabel(page.caption, page.bitmap, textRect, wxALIGN_CENTRE);
|
||||||
|
|
||||||
// draw focus rectangle
|
// draw focus rectangle
|
||||||
|
Loading…
Reference in New Issue
Block a user