You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Sizing#inflate method rounds values when using a sizing relative to screen size. This rounding can cause decimal values to be adjusted, resulting in multiple relative sizes potentially having a larger size than intended. This issue is particularly evident in an LTR flow layout, where components should sum to 100%.
While an LTR flow layout may seem like an unusual case for having components at 100%, in my scenario, I use it alongside an animation where components default to 50%. If they do not meet the minimum size, they expand to 100%, enhancing responsiveness for various screen sizes
Description
The
Sizing#inflate
method rounds values when using a sizing relative to screen size. This rounding can cause decimal values to be adjusted, resulting in multiple relative sizes potentially having a larger size than intended. This issue is particularly evident in an LTR flow layout, where components should sum to 100%.While an LTR flow layout may seem like an unusual case for having components at 100%, in my scenario, I use it alongside an animation where components default to 50%. If they do not meet the minimum size, they expand to 100%, enhancing responsiveness for various screen sizes
owo-lib/src/main/java/io/wispforest/owo/ui/core/Sizing.java
Lines 31 to 37 in 5c5709f
Alternative Solution
One alternative solution could be to reduce each component's size by 1%
Attachments
Video_2024-09-23_18-34-44.mp4
Video code
Versions
owo-lib = 0.12.14+1.21
fabric-api = 0.104.0+1.21.1
The text was updated successfully, but these errors were encountered: