Expose raw values for Font Scale and Pixel Ratio #187
Closed
levibuzolic
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
Hey 👋 I'm considering doing this in the near future. I want to expose more and more features to |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
👋 Jacek.
I was wondering if you would consider exposing the raw values for pixel ratio/density and font scale?
The recently added
contentSizeCategory
is very useful, but I was a little surprised to see the underling pixel ratio and font scale values not being exposed along side it.I'm currently using PixelRatio and FontScale to manually scale some UI elements while having greater control over min/max scales.
I currently solve this in user-land with a hook that reads
PixelRatio.get()
andPixelRatio.getFontScale()
anytime the application is foregrounded. I could read these values in a dynamic stylesheet call, but if the scales don't change enough to fall into a new content size category, I won't get updated values to use.Having these exposed on
UnistylesRuntime
would mean this logic could be moved into the stylesheet (where I think it'd more naturally belong).Beta Was this translation helpful? Give feedback.
All reactions