[Git][wxwidgets/wxwidgets][master] Fix colour of selected text in high contrast themes in wxDVC

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Apr 14, 2026, 10:26:16 PM (4 days ago) Apr 14
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • aa3e8606
    by Steve Cornett at 2026-04-15T03:45:52+02:00
    Fix colour of selected text in high contrast themes in wxDVC
    
    wxSYS_COLOUR_LISTBOXTEXT doesn't have good contrast with the selected
    items background colour in high contrast themes and while using
    wxSYS_COLOUR_HIGHLIGHTTEXT does work for these themes, it doesn't work
    well for the standard theme.
    
    Use the theme colour instead of system colours for something that seems
    to work well enough in all cases.
    
    Closes #26378.
    
    Co-Authored-By: Vadim Zeitlin <va...@wxwidgets.org>
    

1 changed file:

Changes:

  • src/msw/renderer.cpp
    ... ... @@ -972,7 +972,7 @@ void wxRendererXP::DrawItemText(wxWindow* win,
    972 972
             wxColour textColour = dc.GetTextForeground();
    
    973 973
             if (flags & wxCONTROL_SELECTED)
    
    974 974
             {
    
    975
    -            textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
    
    975
    +            textColour = hTheme.GetColour(LVP_LISTITEM, TMT_TEXTCOLOR, LISS_SELECTED);
    
    976 976
             }
    
    977 977
             else if (flags & wxCONTROL_DISABLED)
    
    978 978
             {
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help Notification message regarding https://gitlab.com/wxwidgets/wxwidgets/-/commit/aa3e86063782c8e04e92bdbd513d0d8702acb73d at 1776219973

Reply all
Reply to author
Forward
0 new messages