Skip to content

Commit

Permalink
Stylistic polishes to legend dialog box content and title. #297
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed Jun 19, 2018
1 parent 53056a9 commit 9f156d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions js/common/MassesAndSpringsConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ define( function( require ) {
// Constants regarding fonts
LABEL_FONT: new PhetFont( 12 ),
TITLE_FONT: new PhetFont( 14 ),
LEGEND_ABBREVIATION_FONT: new PhetFont( { size: 16, weight: 'bold' } ),
LEGEND_DESCRIPTION_FONT: new PhetFont( 16 ),

// Constants regarding panels
PANEL_VERTICAL_SPACING: 10,
Expand Down
9 changes: 5 additions & 4 deletions js/common/view/EnergyGraphNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ define( function( require ) {
var Range = require( 'DOT/Range' );
var massesAndSprings = require( 'MASSES_AND_SPRINGS/massesAndSprings' );
var MassesAndSpringsConstants = require( 'MASSES_AND_SPRINGS/common/MassesAndSpringsConstants' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var RichText = require( 'SCENERY/nodes/RichText' );
var Text = require( 'SCENERY/nodes/Text' );
var VBox = require( 'SCENERY/nodes/VBox' );
Expand Down Expand Up @@ -205,15 +206,15 @@ define( function( require ) {
spacing: 20,
children: [
new AlignBox( new RichText( itemData.abbreviation, {
font: MassesAndSpringsConstants.TITLE_FONT,
font: MassesAndSpringsConstants.LEGEND_ABBREVIATION_FONT,
fill: itemData.color,
maxWidth: MAX_WIDTH
} ), {
group: abbreviationGroup,
xAlign: 'left'
} ),
new AlignBox( new Text( itemData.description, {
font: MassesAndSpringsConstants.TITLE_FONT
font: MassesAndSpringsConstants.LEGEND_DESCRIPTION_FONT
} ), {
group: descriptionGroup,
xAlign: 'left',
Expand All @@ -240,8 +241,8 @@ define( function( require ) {
ySpacing: 20,
bottomMargin: 20,
title: new Text( energyLegendString, {
font: MassesAndSpringsConstants.TITLE_FONT,
maxWidth: MAX_WIDTH
font: new PhetFont( 22 ),
maxWidth: MAX_WIDTH*2
} )
} );
}
Expand Down
2 changes: 1 addition & 1 deletion masses-and-springs-strings_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"value": "E<sub>therm</sub>"
},
"eTot": {
"value": "E<sub>tot</sub>"
"value": "E<sub>total</sub>"
},
"forces": {
"value": "Forces"
Expand Down

0 comments on commit 9f156d3

Please sign in to comment.