mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Issue #1485 - Fix incorrect grid cell sizing to min/max space.
There were actually two separate logical errors in this method: The first part is that "origSizes.isSome()" is simply a bogus requirement for applying min/max-sizes here. I'm still keeping the optimization of not needlessly copying the mSizes array (as originally intended) since it's a quite common case. The second bug is that min/max-sizes were only applied under the "if (fr != 0.0f)" block. This is bogus since the calculated 'fr' value depends on 'aAvailableSize' which might change by applying min/max-sizes and thus 'fr' could become non-zero in the second round. To fix, this patch just moves "applyMinMax" block out one level.
This commit is contained in:
parent
648b7278f6
commit
30e381eea2
3 changed files with 77 additions and 29 deletions
|
|
@ -107,4 +107,28 @@
|
|||
<div class="item"></div>
|
||||
</div>
|
||||
|
||||
<pre>The first 6 grids should look the same:</pre>
|
||||
<div class="grid rows" style="grid: 1fr / 30px; height:83px">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="grid rows" style="grid: 10px 1fr / 30px; height:83px">
|
||||
<div class="item" style="grid-row:span 2"></div>
|
||||
</div>
|
||||
<div class="grid rows" style="grid: 1fr / 30px; height:83px">
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
<div class="grid rows" style="grid: 1fr 1fr / 30px; height:83px">
|
||||
<div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
|
||||
</div>
|
||||
<div class="grid rows" style="grid: 1fr auto / 30px; height:83px">
|
||||
<div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
|
||||
</div>
|
||||
<div class="grid rows" style="grid: 10px 1fr / 30px; height:83px">
|
||||
<div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
|
||||
</div>
|
||||
<div class="grid rows" style="grid: 1fr 1fr / 30px; grid-row-gap:10px; height:83px">
|
||||
<div class="item" style="grid-row:span 2"><div style="height:40px"></div></div>
|
||||
<div class="item"><div style="height:40px"></div></div>
|
||||
</div>
|
||||
|
||||
</body></html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue