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

Units.dp and dp() function always gives the same value. #448

Closed
arif193 opened this issue Jun 10, 2016 · 3 comments · May be fixed by #461
Closed

Units.dp and dp() function always gives the same value. #448

arif193 opened this issue Jun 10, 2016 · 3 comments · May be fixed by #461

Comments

@arif193
Copy link

arif193 commented Jun 10, 2016

i don't know if papyros handle qml-material for device screen yet, but it seems like that this issue is related to Qml core module after all, the Units.dp property and the dp() function always gives the same value = 1 for many screen types(xxhdpi, hdpi and so on..... ) , i wonder to know if anyone had already found a solution, and how, for me i've already tried to find if there is another type i can used but with no success, until now i've found one trick (i may call it a dirty one !) is by estimating the dp density using the height of the actual toolbar on the android phone, since it always equal to 24*dp, then divided it by 24, and using the new value to scale others elements to fit on the screen.

@arif193 arif193 closed this as completed Jun 10, 2016
@arif193 arif193 reopened this Jun 10, 2016
@remi-parain
Copy link
Contributor

I created a pull request some time ago which manage to resolve this issue on android.
here is the commit :
ce84b7f

it resolved all my issues :)

@arif193
Copy link
Author

arif193 commented Jun 15, 2016

you saved my time thanks
i'm curiously wonder why it didn't get merged yet

@iBelieve
Copy link
Member

@remi-parain's pull request has been merged, so this should be fixed now.

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 a pull request may close this issue.

3 participants