tui-rs icon indicating copy to clipboard operation
tui-rs copied to clipboard

Allow Ratio and Percentage constraints to be split independently from the other constraints

Open figsoda opened this issue 4 years ago • 0 comments

Right now, when Ratio or Percentage constraints are mixed with other constraints like Length, if the sum of ratio constraints is 1, the total length of constraints would exceed the original size, resulting in the most right constraint being cut off.

I would like to have (either an option or a change so that) Ratio and Percentage constraints to be split independently from the other constraints. For example, if I have a layout with a length of 15 and constraints of vec![Ratio(1, 5), Length(5), Ratio(4, 5)], I would like for it to be split into vec![2, 5, 8] instead of vec![4, 5, 6].

figsoda avatar Nov 01 '20 15:11 figsoda