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

ui-spacetimechart: add support for HiDPI #880

Merged
merged 1 commit into from
Feb 11, 2025
Merged

Conversation

emersion
Copy link
Member

@emersion emersion commented Feb 5, 2025

Multiply the canvas buffer size by the number of physical pixels per logical pixels. Use CSS to set the size of the canvas element in logical pixels.

To test, use a HiDPI screen and compare blurriness with the storybook on GitHub Pages.

Part of #757: this fixes blurriness on the space time chart, the speed space chart is left untouched for now (requires more involved changes).

Multiply the canvas buffer size by the number of physical pixels
per logical pixels. Use CSS to set the size of the canvas element
in logical pixels.

Signed-off-by: Simon Ser <[email protected]>
References: #757
@emersion emersion requested a review from a team as a code owner February 5, 2025 11:10
@emersion emersion requested review from Math-R and theocrsb February 5, 2025 11:11
@emersion emersion self-assigned this Feb 5, 2025
@theocrsb
Copy link
Contributor

theocrsb commented Feb 5, 2025

Works well for me
image

Copy link
Contributor

@Math-R Math-R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, tested on several resolution & HiDPI devices

@emersion emersion added this pull request to the merge queue Feb 11, 2025
Merged via the queue into dev with commit de878a4 Feb 11, 2025
6 checks passed
@emersion emersion deleted the emr/spacetimechart-scale branch February 11, 2025 13:04
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.

3 participants