The with-
methods are really useful on juce::FlexItem
, but it’s a little irritating that the flex-grow
, flex-shrink
, and flex-basis
properties all use the withFlex()
method… Could we please get separate withFlexGrow()
, withFlexShrink()
, and withFlexBasis()
methods?
E.g. if I want to specify only the flex-basis
of an item I have to do:
flex.items = {
juce::FlexItem {widget}
.withFlex (0.0f, 1.0f, 100.0f),
};
Which involves a lot of magic numbers, and knowing what the default grow and shrink values are!
I could have an explaining var for each part, but it’d be so much nicer to simply have:
flex.items = {
juce::FlexItem {widget}
.withFlexBasis (100.0f),
};