Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose separate track color in theme #377

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bszollosinagy
Copy link
Contributor

Make the choice of color for the Slider tracker, and the unused portion of the Progress Bar and Meter more explicit.
It now becomes a design choice in the theme, rather than being hard coded.

Motivation:

  1. The original Bootswatch.com Litera theme has darker Slider trackers, which means that it can be a reasonable design choice
  2. The light themes have a Slider tracker that is hard to see, same with the progress bars. In some designs this is perfectly fine, but in others it makes the design hard to parse visually.
  3. Let the designer of the theme decide... don't link this parameter in a hard coded way

I have updated all the standard themes to expose the originally hard coded color, to this is expected to be a drop-in replacement.

Before this modification:

  • For light themes:
    • the tracker color is always colors.light (except when the widget is specifically styled "light", then it's colors.bg)
  • For dark themes:
    • the tracker color is always -20% Value (HSV) adjusted from colors.selectbg

After this modification:

  • Exposed to themes with the color name "track", and initialized to the color scheme that used to be hard-coded, to allow a drop-in replacement.

Tested by running TTKCreator and trying all themes:
python -m ttkcreator

* initialise this new color to the same value that was hardcoded before
@bszollosinagy
Copy link
Contributor Author

Original Color Scheme for Scale:
image

Possible new one (or any other, see the "track" color spec the lower left corner)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant