On Windows, wxFrame
is setting the background color of windows to wxSYS_COLOUR_APPWORKSPACE
on Create() here. This is overriding Windows default color OOB, I wonder why this is being done. To remove it I call SetBackgroundColour(wxNullColor)
after every wxFrame creation.
Secondly, when toggling Dark/Light mode on Windows, the window background isn't being updated as expected with or without a background color set.
Create a default wxFrame window on Windows and show it/toggle dark/light mode
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
I believe this will help. https://www.mediafire.com/file/bns4sju60bw06kq/fix.zip/file
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
I think the default background colour is correct (for the light mode). And in any case, this is what it was for ~30 years and so I really don't think we should change it.
However we should update it when the mode changes, of course. But please note that currently this is not at all the only thing that is not updated and some of them are rather difficult to update dynamically.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
I'm pretty sure the background color is incorrect in light mode - or this particular color is no longer used. It's a dark gray while the various OS windows are light gray. If you clear the color (using SetBackgroundColour(wxNullColor)) you get the default background color that matches the OS.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Here are a couple screenshots comparing the File Explorer Properties dialog (a win32 app) to the WX default color (disregard the incorrect UI elements).
Default.png (view on web) NullColor.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.
The default background colour is what Windows uses (used?) for document-oriented applications, not the dialogs — which use a different colour by default (and always did).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
I figured that is the reason it is dark. However, shouldn't it only be using that color if you're making a MDI parent frame, not a regular wxFrame?
That said, I understand why you'd be reluctant to change the default color after so many years. If WX could refresh the background color correctly in both the default color case and the null color case when switching from dark/light modes that would be ideal.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.