While working on layout for NumberPairs I noticed that the contentXMarginwasn't being applied as expected. It appeared to be splitting the margin in half since the margin was not being multiplied by 2 in the minimum width calculation when showTitleWhenExpanded is set to false.
I further noticed that titleXMargin is being multiplied by 2 in all scenarios.
Understandably contentYMargin is only being multiplied when showTitleWhenExpanded is false. I assume this is because we do not want to apply a margin between the title and the content, we only want to apply contentYSpacing.
Overall, it seems like contentXMargin is not being applied consistently or as expected. Since this affects a large number of sims I would like to discuss with @jonathanolson before moving forward.
// content is next to button
else {
minimumBoxWidth = Math.max( minimumBoxWidth, this.expandCollapseButton.width + minimumContentWidth + options.buttonXMargin + options.contentXMargin + options.contentXSpacing );
}
While working on layout for NumberPairs I noticed that the
contentXMargin
wasn't being applied as expected. It appeared to be splitting the margin in half since the margin was not being multiplied by 2 in the minimum width calculation whenshowTitleWhenExpanded
is set to false.I further noticed that
titleXMargin
is being multiplied by 2 in all scenarios.Understandably
contentYMargin
is only being multiplied whenshowTitleWhenExpanded
is false. I assume this is because we do not want to apply a margin between the title and the content, we only want to applycontentYSpacing
.Overall, it seems like
contentXMargin
is not being applied consistently or as expected. Since this affects a large number of sims I would like to discuss with @jonathanolson before moving forward.