FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Background coloring in textbox when using macOS in dark mode · Issue #242 · diffpy/diffpy.pdfgui · GitHub

Repository navigation

fix: Background coloring in textbox when using macOS in dark mode #242

Closed

Description

Problem

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?

Activity

  1. changed the title [-]Fix background coloring in textbox[/-] [+]Fix: Background coloring in textbox when using macOS in dark mode[/+] on Jan 6, 2025
  2. 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
  3. sbillinge commented on Jan 12, 2025

    Contributor

    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
    
  4. added this to the v3.2.0 milestone on Jan 12, 2025
  5. sbillinge commented on Jan 12, 2025

    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL