Menu

Accessibility for low light environments

wez
2025-12-29
2025-12-31
  • wez

    wez - 2025-12-29

    I received my first Geiger counter today and having a fun time exploring GeigerLog. Thanks for this great program!

    Due to light sensitivity I use a dark mode appearance on my desktop environment (Linux, KDE Plasma). Unfortunately this makes some texts, inputs and dialogs unreadable as they override the OS defaults.

    Attached screenshots demonstrates the issues:

    • GeigerLog_Config.png (device configuration screen)
    • GeigerLog_confirmation.png (Append confirmation)
    • GeigerLog_Graph.png (Note the time min/max in the graph dashboard, text is invisible unless selected)
    • GeigerLog_LogPad.png (Note the text here is also unreadable unless a selection is made)

    I have made these changes to the source which addresses these issues.

    File ggeiger.py: comment out lines opening file gstyle.qss and calls g.app.setStyleSheet

    class ggeiger(QMainWindow):
        def __init__(self):
            ...
            # with open(os.path.join(g.resDir, "gstyle.qss"), "r") as f:
                # _style = f.read()
                # g.app.setStyleSheet(_style)
    

    File gsup_utils.py
    In two print routines change the lines that set the fallback/default colour from "black" to "white".

    def fprintInColor(text, color):
        ...
        if not color in colortuple:  color = "white"
    
    def fprint(*args, error="", errsound=False):
        ...
        else:                        color = "white"
    

    I realize these changes are just hacks as they don't switch with the OS light/dark mode, I leave them here in case someone else needs to do the same. If the app implements a dark-mode detection then these changes could be automated. Just a friendly suggestion :)

    Again, thanks for this wonderful software!

     
  • ullix

    ullix - 2025-12-30

    Respect for figuring out what changes are needed for dark mode! I tested it, and it seems to work.

    I am a bit surprised: is that really all there is needed for dark mode? It seems too easy. I find no way for PyQt6 to auto- detect a dark mode versus a light mode. Is there one?

    However, a mildly smarter hack could be to put this in the configuration, and allow the user to change it. It still won't be automatic, but is easy to do. Would that work for you?

     
    • wez

      wez - 2025-12-31

      Hi Ullix, indeed a user config option makes the most sense, that is a very good idea.

      Auto detection is over rated anyway :)

       
  • ullix

    ullix - 2025-12-31

    Ok, is done. Watch for the upcoming pre-release 02 here:
    https://sourceforge.net/p/geigerlog/discussion/devel2/

     
    👍
    1

Log in to post a comment.