This introduces a new system color enum value for wxSYS_COLOUR_GRIDLINES which maps to BTNFACE on platforms other than macOS. On macOS, it will use the NSColor gridColor.
This also adjusts the property grid categories when in dark mode. If the color is too dark, it will lighten it slightly. This produces a fairly good looking property grid in dark mode:
Screenshot.2025-09-09.at.7.07.35.PM.png (view on web)https://github.com/wxWidgets/wxWidgets/pull/25785
(9 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@vadz commented on this pull request.
I'm not sure how to reconcile this with your comment about gridColor
not really working, but if it works, all the better!
Please just fix the build failures and then we could merge this.
Thanks!
> @@ -91,6 +92,7 @@ enum wxSystemColour wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, wxSYS_COLOUR_FRAMEBK = wxSYS_COLOUR_BTNFACE +⬇️ Suggested change
-
> @@ -115,7 +115,13 @@ enum wxSystemColour */ wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT, - + /** + On macOS, this maps to [NSColor gridLines], on other platforms + it's mapped to wxSYS_COLOUR_BTNFACE + @since 3.3⬇️ Suggested change
- @since 3.3 + @since 3.3.2
> + #ifdef __WXOSX__ + if (wxSystemSettings::GetAppearance().IsDark()) + { + // Make sure colour is light enough + int colDec = wxPGGetColAvg(col); + if (colDec < 30) + col = wxPGAdjustColour(col, 20); + }
To be honest, I find this code quite incomprehensible, but then the existing version was already so. I wonder if we can abstract this to some function with a readable name?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@dkulp pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
I'm not sure how to reconcile this with your comment about
gridColor
not really working, but if it works, all the better!Please just fix the build failures and then we could merge this.
Thanks!
The main issue is that gridColor was too dark for the PropertyGrid categories. It's "kind of" too dark (IMO) for wxGrid in dark mode, but it's at least visible. gridColor does work quite well in light mode.
Screenshot.2025-09-09.at.7.42.37.PM.png (view on web) Screenshot.2025-09-09.at.7.42.24.PM.png (view on web)—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@dkulp pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.