Skip to content

Commit

Permalink
#191 fix inverting of PhET button colors
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 3, 2015
1 parent c7466f4 commit 8dfb873
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/PhetButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ define( function( require ) {

JoistButton.call( this, icon, sim.useInvertedColorsProperty, options );

Property.multilink( [ this.interactionStateProperty, sim.useInvertedColorsProperty ], function( interactionState, useInvertedColors ) {
optionsButton.fill = useInvertedColors ? '#222' : 'white';
phetLabel.image = useInvertedColors ? phetLogoDarker : phetLogo;
Property.multilink( [ sim.useInvertedColorsProperty, sim.simModel.showHomeScreenProperty ], function( useInvertedColors, showHomeScreen ) {
var invert = ( useInvertedColors && !showHomeScreen );
optionsButton.fill = invert ? '#222' : 'white';
phetLabel.image = invert ? phetLogoDarker : phetLogo;
} );
}

Expand Down

0 comments on commit 8dfb873

Please sign in to comment.