GithubHelp home page GithubHelp logo

Comments (3)

semuadmin avatar semuadmin commented on July 26, 2024 1

Yep, that's what I was looking for, thanks

Actually, on further investigation, the issue is simply that I'm setting an explicit background colour in the Settings panel widgets, but not an explicit foreground color. If I specify neither, the application can respond dynamically to Light and Dark mode on MacOS:

pygpsclient_dark

Note that 'Dark' mode works differently on Windows and Linux, but in all cases the text will now be legible.

from pygpsclient.

semuadmin avatar semuadmin commented on July 26, 2024

Hi @RomanTheLegend

Unfortunately reliable automatic 'dark mode' detection across different O/S platforms is problematic (though not impossible) with tkinter. There are libraries available e.g. darkdetect, but AFAICS they're not yet fully mature.

The easiest way to address this (from an application standpoint) would be to add a user-selectable colormode option to the application itself, via the new json config file facility introduced in v1.3.22, e.g:

{
...
"colormode": "dark"
...
}

The font colours would then be amended accordingly.

Would that be an acceptable solution?

As an interim workaround, you could amend the following values in globals.py:

BGCOL = "gray24"  # default widget background color
FGCOL = "white"  # default widget foreground color

(As it happens I normally run in 'Dark' mode on Windows and Linux but reverted to 'Light' on my Mac as too many off-the-shelf applications didn't seem to play well with 'Dark' mode.)

from pygpsclient.

RomanTheLegend avatar RomanTheLegend commented on July 26, 2024

Yep, that's what I was looking for, thanks

from pygpsclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.