Unity Issue Tracker - UI Toolkit element row margins are scaled inconsistently when UI Scaling is bigger than the default
Closed
UUM-76432
UI Toolkit element row margins are scaled inconsistently when UI Scaling is bigger than the default
Unity: UI Toolkit Framework
Won't Fix
6.5.X
6.4.X
6.3.X
6.2.X
6.1.X
6.0.X
2022.3.X
2021.3.X
Cancelling: the 6000.1 version has reached its end of life. If you need additional fixes, please upgrade to a newer Unity version.
How to reproduce:
1. Open the “FlexWarpScalingBug.zip“ project
2. Click “Test/Test“ in the Toolbar to open a “MyEditorWindow“ Window
3. Change the UI Scaling in Preferences (through desktop settings or custom value) to a bigger value (from the default option to 1-2 options higher)
4. Observe the “MyEditorWindow“ Window
Expected result: All colored boxes fit into the black-bordered box
Actual result: The last colored box does not fit and goes down by one row
Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: MacOS 14.4.1 (M2) (No UI Scaling), No other environment tested
Notes:
To expand on 3rd step: if your default UI Scaling is 100%, you should change to 125% scaling. Similarly, if your scaling is 250%, you should change to 350%, downscaling causes no issue
Does not seem to reproduce when the bordered box’s “style.flexWrap” enum is set to “NoWrap”
Changing the colored box’s margins to an even number (2, 4, 6, 8, etc.) will fix the issue
In version 6000.0.10f1, the second row colored box is not encapsulated by the bordered box
Prioritise and Follow this issue
Have a workaround or additional info about this issue?