Skip to content
New issue

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

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

Already on GitHub? # to your account

ctx.text_align not passed to app draw functions consistently #181

Open
Robotmad opened this issue Jun 29, 2024 · 1 comment
Open

ctx.text_align not passed to app draw functions consistently #181

Robotmad opened this issue Jun 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Robotmad
Copy link
Contributor

Describe the bug
We had issues with our app not rendering as expected, apparently a bit random, in terms of text alignment. Work around was to explicitly set ctx.text_align and ctx.text_baseline every time.

Version: v1.8 & v1.9.0-beta1 (probably earlier too)

To Reproduce
Not sure - just use the badge and then run app.

Expected behavior
Expect ctx context to be passed into draw consistently each time - hence only need to set things that you want to be different to 'default'

Additional context
Reporting now as I've seen it on CaffeineJitters too and have a suggestion of where the issue lies.
I think the modules/app_components/menu.py draw function modifies ctx.text_align and ctx.text_baseine without saving and restoring.

@Robotmad Robotmad added the bug Something isn't working label Jun 29, 2024
@walkerdanny
Copy link

Second this, I was seeing some strange behaviour when testing some code yesterday. Your idea that something isn't saving and restoring the state feels right.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants