This correctly draws the selected rectangle when the control has focus
in both light and dark modes. If the app is in light mode it also
picks what looks to be an appropriate grey if the control does not
have focus. But when the control doesn't have the focus, then that
grey is too bright in dark mode. Any idea how to adapt this to dark
mode?
Robert
Stefan Csomor
unread,
Dec 16, 2025, 2:42:53 AM (4 days ago) Dec 16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-...@googlegroups.com
Hi Robert
Does this also look wrong when the app has been started in dark Mode ? The reason I’m asking is because wxMacCreateCGColorFromHITheme has some caching involved. And IIRC only NSColor change their RGB values according to the current appearance, and not CGColors.
Going to use NSColors and constructing wxColours directly from them would perhaps offer better results, the scope would have to be guarded with a wxOSXEffectiveAppearanceSetter helper ,
https://developer.apple.com/documentation/appkit/ui-element-colors would
give the secondarySelectedControlColor as replacement, if also this color is not usable in dark mode then perhaps we might have to darken the resulting
wxColour in dark mode.
HTH,
Stefan
Robert Roebling
unread,
Dec 16, 2025, 12:19:13 PM (4 days ago) Dec 16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-...@googlegroups.com
No change when I change to dark mode before creation of the first wxFrame
Robert
Am Di., 16. Dez. 2025 um 08:42 Uhr schrieb 'Stefan Csomor' via wx-dev
<wx-...@googlegroups.com>: