diff --git a/js/HomeButton.js b/js/HomeButton.js index 67a4da61..42a2119a 100644 --- a/js/HomeButton.js +++ b/js/HomeButton.js @@ -13,7 +13,8 @@ define( function( require ) { var JoistButton = require( 'JOIST/JoistButton' ); var Property = require( 'AXON/Property' ); - function HomeButton( fill, pressedFill, invertedFill, invertedPressedFill, lookAndFeel, model, options ) { + function HomeButton( lookAndFeel, model, options ) { + var homeIcon = new FontAwesomeNode( 'home', { scale: 0.75 } ); @@ -30,12 +31,11 @@ define( function( require ) { JoistButton.call( this, homeIcon, lookAndFeel, options ); Property.multilink( [ this.interactionStateProperty, lookAndFeel.navigationBarFillProperty ], function( interactionState, navigationBarFill ) { - var useInvertedColors = navigationBarFill !== 'black'; - if ( !useInvertedColors ) { - homeIcon.fill = interactionState === 'pressed' ? pressedFill : fill; + if ( navigationBarFill === 'black' ) { + homeIcon.fill = interactionState === 'pressed' ? 'gray' : 'white'; } else { - homeIcon.fill = interactionState === 'pressed' ? invertedPressedFill : invertedFill; + homeIcon.fill = interactionState === 'pressed' ? '#444' : '#222'; } } ); } diff --git a/js/NavigationBar.js b/js/NavigationBar.js index 52d16400..2269426e 100644 --- a/js/NavigationBar.js +++ b/js/NavigationBar.js @@ -73,7 +73,7 @@ define( function( require ) { this.addChild( this.buttonHBox ); //add the home button - this.homeButton = new HomeButton( 'white', 'gray', '#222', '#444', sim.lookAndFeel, sim ); + this.homeButton = new HomeButton( sim.lookAndFeel, sim ); this.addChild( this.homeButton ); // if the branding specifies to show "adapted from PhET" in the navbar, show it here diff --git a/js/Sim.js b/js/Sim.js index d2e9e352..f2947b37 100644 --- a/js/Sim.js +++ b/js/Sim.js @@ -575,9 +575,7 @@ define( function( require ) { // Resize the layer with all of the dialogs, etc. sim.topLayer.setScaleMagnitude( scale ); - if ( sim.homeScreen ) { - sim.homeScreen.view.layoutWithScale( scale, width, height ); - } + sim.homeScreen && sim.homeScreen.view.layoutWithScale( scale, width, height ); // Startup can give spurious resizes (seen on ipad), so defer to the animation loop for painting