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

Fix time centering in overlay #238

Open
TristanDebrunner opened this issue Dec 19, 2023 · 0 comments
Open

Fix time centering in overlay #238

TristanDebrunner opened this issue Dec 19, 2023 · 0 comments
Labels
bug Something isn't working Overlay

Comments

@TristanDebrunner
Copy link
Collaborator

Currently, when a time is displayed, the entire time string (ie "12:34") is centered in the spot we want it. Because we are not using a monospaced font, as the time counts down the colon shifts left and right as the digits change widths.

Proposed Solution:
Split all time displays into three parts: the minutes, the colon, and the seconds. Then, draw them all separately:

  • Minutes justified right
  • Colon justified center
  • Seconds justified left

This will lock the colon into the correct center spot, and the digits will be displayed correctly relative to the colon

@TristanDebrunner TristanDebrunner added bug Something isn't working Overlay labels Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Overlay
Projects
None yet
Development

No branches or pull requests

1 participant