From be68864ed9709d171e367c2cf39b97973dbec240 Mon Sep 17 00:00:00 2001 From: denz1994 Date: Wed, 11 Jul 2018 15:40:03 -0400 Subject: [PATCH] Increased font size of slider titles by to reducing x spacings needed in panel. #292. --- js/common/view/GravityAndDampingControlNode.js | 10 +++++----- js/common/view/SpringScreenView.js | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/js/common/view/GravityAndDampingControlNode.js b/js/common/view/GravityAndDampingControlNode.js index 7be47748..95166bb5 100644 --- a/js/common/view/GravityAndDampingControlNode.js +++ b/js/common/view/GravityAndDampingControlNode.js @@ -95,7 +95,7 @@ define( function( require ) { xMargin: 0, majorTickLength: 10, titleFont: new PhetFont( { size: 14, weight: 'bold' } ), - titleMaxWidth: MAX_WIDTH * 3, + titleMaxWidth: MAX_WIDTH , trackSize: new Dimension2( 125, 0.1 ), thumbSize: new Dimension2( 13, 24 ), thumbFillEnabled: '#00C4DF', @@ -117,7 +117,7 @@ define( function( require ) { } ], layoutFunction: NumberControl.createLayoutFunction1( { - titleXSpacing: 75, + titleXSpacing: 58, ySpacing: 2, arrowButtonsXSpacing: 1 } ), @@ -127,7 +127,7 @@ define( function( require ) { valueFont: new PhetFont( { size: 14} ), useRichText: true, decimalPlaces: 1, - valueMaxWidth: MAX_WIDTH * 2, + valueMaxWidth: MAX_WIDTH , delta: 0.1, arrowButtonScale: 0.5 }; @@ -193,7 +193,7 @@ define( function( require ) { // Creating title for damping hSlider var dampingHSliderTitle = new Text( dampingString, { font: new PhetFont( { size: 14, weight: 'bold' } ), - maxWidth: MAX_WIDTH * 3, + maxWidth: MAX_WIDTH, top: gravityComboBox.bottom + SPACING, left: TITLE_INDENT } ); @@ -253,7 +253,7 @@ define( function( require ) { // Alignment of Node contents for panel with damping if ( gravitySlider instanceof NumberControl ) { - gravitySliderTitle.leftTop = new Vector2( this.left, this.top + 22.5 ); + gravitySliderTitle.leftTop = new Vector2( this.left-10, this.top + 22.5 ); gravitySlider.centerX = this.centerX; gravitySlider.left = this.left; gravitySlider.top = this.top + 7; diff --git a/js/common/view/SpringScreenView.js b/js/common/view/SpringScreenView.js index 7d015249..312d23bc 100644 --- a/js/common/view/SpringScreenView.js +++ b/js/common/view/SpringScreenView.js @@ -153,9 +153,6 @@ define( function( require ) { model, this, tandem.createTandem( 'gravityAndDampingControlNode' ), { maxWidth: MassesAndSpringsConstants.PANEL_MAX_WIDTH, dampingVisible: options.dampingVisible, - xMargin: 0, - yMargin: 0, - stroke: null, hSlider: options.gravityHSlider } );