mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08: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.
This commit is contained in:
committed by
Vadim Zeitlin
parent
31966f7d66
commit
aaa15aad6d
@@ -3408,7 +3408,7 @@ void HandleItemPaint(wxListCtrl* listctrl, LPNMLVCUSTOMDRAW pLVCD)
|
||||
? wxColourToRGB(attr->GetTextColour())
|
||||
: wxColourToRGB(listctrl->GetTextColour());
|
||||
pLVCD->clrTextBk = clrFullBG;
|
||||
if ( nmcd.uItemState & CDIS_SELECTED )
|
||||
if ( nmcd.uItemState & CDIS_SELECTED && !(attr && attr->HasTextColour()) )
|
||||
pLVCD->clrText = wxColourToRGB(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
|
||||
if ( !(nmcd.uItemState & CDIS_SELECTED) && !(nmcd.uItemState & CDIS_HOT)
|
||||
&& attr && attr->HasBackgroundColour() )
|
||||
|
||||
Reference in New Issue
Block a user