Skip to content

Commit

Permalink
Applying maxWidth to Text only for the scale number control, see #104
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Mar 21, 2023
1 parent c2d9303 commit 2ec0f8a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/common/view/MySolarSystemControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ export default class MySolarSystemControls extends VBox {
new HSeparator( SolarSystemCommonConstants.HSEPARATOR_OPTIONS ),
...createArrowsVisibilityCheckboxes( model, providedOptions.tandem ),
new HBox( {
maxWidth: SolarSystemCommonConstants.TEXT_MAX_WIDTH,
spacing: 0,
enabledProperty: model.gravityVisibleProperty,
children: [
new Text( SolarSystemCommonStrings.scaleStringProperty, combineOptions<TextOptions>( { layoutOptions: { leftMargin: 20 } }, SolarSystemCommonConstants.TEXT_OPTIONS ) ),
new Text( SolarSystemCommonStrings.scaleStringProperty, combineOptions<TextOptions>( {
maxWidth: SolarSystemCommonConstants.TEXT_MAX_WIDTH / 2,
layoutOptions: { leftMargin: 20 }
}, SolarSystemCommonConstants.TEXT_OPTIONS ) ),
new NumberControl( SolarSystemCommonStrings.scaleStringProperty, model.forceScaleProperty, model.forceScaleProperty.range, {
arrowButtonOptions: { visible: false },
sliderOptions: {
Expand Down

0 comments on commit 2ec0f8a

Please sign in to comment.