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

Fixed locale-dependent canvas scaling bug #2468

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ElSaico
Copy link

@ElSaico ElSaico commented Jun 13, 2024

Closes #571

Currently CTk does not run at all under some locales (such as German and Portuguese) because the widget scaling triggers an ancient Tk canvas bug.

This solution is not mine - it was posted a while ago on the issue comments - but I documented it and added a locale on the scaling integration tests to detect regressions.

Prevents triggering a bug on Tk canvas, where float parameters use locally-aware parsing and thus might expect a different decimal point character

Fixes TomSchimansky#571
@ElSaico
Copy link
Author

ElSaico commented Jun 13, 2024

Some helpful background:

There's this app, EDMarketConnector - best known as EDMC - which has a Tkinter UI, a reasonably large userbase and a history that stretches back to the late Python 2 days.
It also has a set of homebrew themes, but it's a maintenance nightmare which mostly inviabilizes the use of ttk stuff... so eventually I volunteered to deal with this.

Since the majority of its appeal is on its plugin ecosystem - in fact, facing ttk issues while starting out a plugin was my motivation - leaving Tkinter is the absolute last choice. CTk was my first pick because it's mature, well-supported and has a very streamlined theming system, but finding this bug was a dealbreaker; so off to ttk styles I went!

Despite the advances so far, there's some weird bugs on the way, and I suspect that part of it is the OS-specific stuff that's hard to understand and is handled by CTk already, so why not make a small contribution to fix what stopped me before?

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.

tkinter.TclError: bad screen distance "200.0"
1 participant