Closed pixelzoom closed 2 years ago
Sims that use ABSwitch or a subclass:
?secondLocale=es
in built all.html)† uses centerOnButton
option
In the above commits:
xSpacing
was renamed to spacing
, and is the responsibility of HBoxcenterOnButton
was renamed to centerOnSwitch
since there is no "button" in this componentcenterOnSwitch
was changed. Instead of adding an HStrut, the labels are wrapped in AlignBox to make them have the same effective size.Usages were modified as needed, and all sims identified in https://github.com/phetsims/sun/issues/770#issuecomment-1163459590 were tested.
Since this was all pretty trivial, and everyone is busy, I'm going to forgo review. I've done a PSA to Slack#developer. Closing.
I'm still seeing this problem in MOTHA. The UI component shown below is an ABSwitch, and it's text labels have been changed via Studio. Note the overlap of the left label with the switch.
To reproduce in Studio, the phetio IDs are:
modelsOfTheHydrogenAtom.spectraScreen.view.experimentPredictionSwitch.experimentNode.textProperty modelsOfTheHydrogenAtom.spectraScreen.view.experimentPredictionSwitch.predictionNode.textProperty
Looking at ABSwitch, the problem is that it does not use an HBox for layout. It has it's own layout code, which does not support dynamic layout. So the fix is likely to use HBox.