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

[components-webview] Create screen resolution to layout.css.devPixelsPerPx mapping. JB#62599 #170

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rainemak
Copy link
Member

@rainemak rainemak commented Oct 2, 2024

This is rather simple way to map these. At the same, there ain't that many screen resolution that we'd like to map. Thus, this approach is reasoble for our needs.

For testing this, if you have ran browser at least once, you need to remove PREFS_WRITTEN flag file from your device.

rm $HOME/.local/share/org.sailfishos/browser/PREFS_WRITTEN

@rainemak rainemak requested a review from mlehtima October 2, 2024 13:38
@rainemak
Copy link
Member Author

rainemak commented Oct 2, 2024

This could theoretically got to master but I don't see us doing releases from there. So, this should be as good.

@rainemak
Copy link
Member Author

rainemak commented Oct 3, 2024

For reference this 1080x2520 => 2.608695652173913 has been taken from the same device running Android FF.

lib/webenginesettings.cpp Show resolved Hide resolved
lib/webenginesettings.cpp Show resolved Hide resolved
…PerPx mapping. JB#62599

This is rather simple way to map these. At the same, there ain't
that many screen resolution that we'd like to map. Thus, this
approach is reasoble for our needs.

For testing this, if you have ran browser at least once, you need to
remove __PREFS_WRITTEN__ flag file from your device.

> rm $HOME/.local/share/org.sailfishos/browser/__PREFS_WRITTEN__

GitHub issue:
sailfishos/sailfish-browser#1085
@rainemak rainemak changed the base branch from sailfishos-esr91 to master October 10, 2024 12:48
@pvuorela
Copy link
Contributor

Said resolution being in xperia 10 series they appear to have ppi of 457 (10V 449, not that far).
-> 457 / 2.608695652173913 = 175.183

If the non-rounded css pixel ratios are ok, pondering should we just on all(?) the devices compare the device ppi to 175.

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.

2 participants