[Git][wxwidgets/wxwidgets][master] 2 commits: Fix custom foreground colour of selected items in dark mode

0 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Dec 14, 2025, 9:44:02 PM (2 days ago) Dec 14
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • aaa15aad
    by Maarten Bent at 2025-12-14T16:51:20+01:00
    Fix custom foreground colour of selected items in dark mode
    
    Keep the item colour instead of unconditionally replacing it with the
    highlight colour in dark mode too, for consistency with white mode.
    
    Closes #25633.
    
  • cf49b6a2
    by Scott Talbert at 2025-12-14T17:27:11+01:00
    Document wxObjectRefData as a typedef (vs class)
    
    While this is actually more true to reality, this also helps work around
    an issue with Doxygen 1.15.0 (and wxPython builds).  See:
    https://github.com/doxygen/doxygen/issues/11889
    
    Closes #26033.
    

2 changed files:

Changes:

  • interface/wx/object.h
    ... ... @@ -5,7 +5,7 @@
    5 5
     // Licence:     wxWindows licence
    
    6 6
     /////////////////////////////////////////////////////////////////////////////
    
    7 7
     
    
    8
    -/** @class wxObjectRefData
    
    8
    +/** @typedef wxObjectRefData
    
    9 9
     
    
    10 10
         This class is just a typedef to wxRefCounter and is used by wxObject.
    
    11 11
     
    

  • src/msw/listctrl.cpp
    ... ... @@ -3408,7 +3408,7 @@ void HandleItemPaint(wxListCtrl* listctrl, LPNMLVCUSTOMDRAW pLVCD)
    3408 3408
                 ? wxColourToRGB(attr->GetTextColour())
    
    3409 3409
                 : wxColourToRGB(listctrl->GetTextColour());
    
    3410 3410
             pLVCD->clrTextBk = clrFullBG;
    
    3411
    -        if ( nmcd.uItemState & CDIS_SELECTED )
    
    3411
    +        if ( nmcd.uItemState & CDIS_SELECTED && !(attr && attr->HasTextColour()) )
    
    3412 3412
                 pLVCD->clrText = wxColourToRGB(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
    
    3413 3413
             if ( !(nmcd.uItemState & CDIS_SELECTED) && !(nmcd.uItemState & CDIS_HOT)
    
    3414 3414
                                               && attr && attr->HasBackgroundColour() )
    

Reply all
Reply to author
Forward
0 new messages