When in dark mode on macOS, the font color is white. In pdfgui, this causes phase data input (lattice parameters, angles, etc) to appear white-on-white making it impossible to see the inputs unless highlighted over (see images below). This forces the user to switch setting to light mode in order to use pdfgui efficiently (which is annoying).
Proposed solution
Unsure exactly, but this doesn't seem to be an issue when importing datasets. Perhaps use the same or similar code that was used to generate the dataset textboxes for the phase textboxes?
changed the title [-]Fix: Background coloring in textbox when using macOS in dark mode[/-][+]fix: Background coloring in textbox when using macOS in dark mode[/+]on Jan 6, 2025
we may be able to do this globally with something like this:
if wx.SystemSettings.GetAppearance().IsDark():
your_text_control.SetForegroundColour(wx.Colour(255, 255, 255)) # White text
your_text_control.SetBackgroundColour(wx.Colour(30, 30, 30)) # Dark gray background
else:
your_text_control.SetForegroundColour(wx.Colour(0, 0, 0)) # Black text
your_text_control.SetBackgroundColour(wx.Colour(255, 255, 255)) # White background
I put this to the next (3.2.0) release so it doesn't block the current one. But we may be able to push out a minor release bump in the meantime if the fix is straightforward. @cadenmyers13 feel free to look into it and make a PR if you like.
Activity
sbillinge commented on Jan 12, 2025
we may be able to do this globally with something like this:
if wx.SystemSettings.GetAppearance().IsDark(): your_text_control.SetForegroundColour(wx.Colour(255, 255, 255)) # White text your_text_control.SetBackgroundColour(wx.Colour(30, 30, 30)) # Dark gray background else: your_text_control.SetForegroundColour(wx.Colour(0, 0, 0)) # Black text your_text_control.SetBackgroundColour(wx.Colour(255, 255, 255)) # White backgroundsbillinge commented on Jan 12, 2025
I put this to the next (3.2.0) release so it doesn't block the current one. But we may be able to push out a minor release bump in the meantime if the fix is straightforward. @cadenmyers13 feel free to look into it and make a PR if you like.