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

Simplify Scale by removing DPI. #1042

Merged
merged 4 commits into from
Jun 18, 2020
Merged

Simplify Scale by removing DPI. #1042

merged 4 commits into from
Jun 18, 2020

Conversation

xStrom
Copy link
Member

@xStrom xStrom commented Jun 18, 2020

This PR removes any notion of DPI from Scale and makes it strictly scale factor based.

Previously Scale always considered 96 as the target DPI but with this change that decision is in the platform code's hands. This will allow for easier implementation of future platforms that have a different target DPI like Android with 160.

This also means that all the DPI-related stuff can be an implementation detail and it doesn't need to be surfaced to developers using druid. Especially as DPI doesn't really match any actual inches etc.

@xStrom xStrom added shell concerns the shell abstraction S-needs-review waits for review breaking change pull request breaks user code labels Jun 18, 2020
Copy link
Collaborator

@jneem jneem left a comment

Choose a reason for hiding this comment

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

Trying out my new reviewing power... just one little nit in some old code.

druid-shell/src/platform/gtk/window.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@luleyleo luleyleo left a comment

Choose a reason for hiding this comment

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

Looks like a good simplification!

I think it is useful to always link the reason for changes: #913 (comment)

druid-shell/src/platform/gtk/window.rs Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@luleyleo luleyleo added S-waiting-on-author waits for changes from the submitter and removed S-needs-review waits for review labels Jun 18, 2020
@xStrom xStrom added S-needs-review waits for review and removed S-waiting-on-author waits for changes from the submitter labels Jun 18, 2020
@xStrom
Copy link
Member Author

xStrom commented Jun 18, 2020

Thanks, this is ready for another look. 👀

@xStrom xStrom removed the S-needs-review waits for review label Jun 18, 2020
@xStrom xStrom merged commit d810d30 into linebender:master Jun 18, 2020
@xStrom xStrom deleted the remove-dpi branch June 18, 2020 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change pull request breaks user code shell concerns the shell abstraction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants