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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[osx] Use Retina display scale #19

Closed

Conversation

nanoant
Copy link

@nanoant nanoant commented Jul 4, 2020

On Retina displays view/window coordinates are logical points not pixels and window.backingScaleFactor represents how many pixels are covered by single coordinate point.

This change effectively makes LAF UI 2x smaller on Retina displays, but allows drawing at native Retina resolution.

A picture is worth a thousand words: (NOTE: Click on the image to see it on full 2x/Retina scale)
image

Picture above depicts Aseprite using 400% scale on Retina and using TTF font instead of bitmap font.

I understand this change may be completely irrelevant for most of the Aseprite users using default UI settings, but if you want to use TTF font this change actually makes all TTF fonts look crisp on macOS Retina displays. And I prefer to have TTF font on my Retina display rather than default bitmap font, that I find hard to read 馃檮

I agree that my contributions are licensed under the Laf license, and agree to future changes to the licensing.

@dacap
Copy link
Member

dacap commented Jul 4, 2020

Hi @nanoant, I like this because it makes even more similar to the Windows implementation (which uses the high DPI resolution). I'll review this next week (still not sure if we should make this optional). Thanks for the contribution!

@nanoant nanoant force-pushed the feature/macos-retina-display-scale branch from 4edd11d to ace9b19 Compare July 4, 2020 14:33
@nanoant
Copy link
Author

nanoant commented Jul 4, 2020

@dacap Great, thanks. Indeed this makes the macOS Aseprite behavior on par with Windows. I was first using Aseprite on my Windows PC machine for Godot development, and then when I tried to use it on my Mac, I found out that despite being NSHighResolutionCapable Aseprite is not drawing at full Retina res. Hence the PR.

FYI I've just updated my PR as I forgot to handle display scale OSXWindow::setScale. I hope now all the necessary code paths are covered.

@dacap dacap self-requested a review July 9, 2020 14:37
@dacap dacap self-assigned this Jul 9, 2020
On Retina displays view/window coordinates are logical points not pixels
and window.backingScaleFactor represents how many pixels are covered
by single coordinate point.

This change effectively makes LAF UI 2x smaller on Retina displays, but allows
drawing at native Retina resolution.
@nanoant nanoant force-pushed the feature/macos-retina-display-scale branch from ace9b19 to afd96cb Compare November 28, 2020 23:50
@dacap dacap closed this Jul 16, 2021
@dacap dacap deleted the branch aseprite:master July 16, 2021 17:06
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

2 participants