Skip to content

Commit

Permalink
Make Compare counting accordion boxes as tall as ten screen accordion…
Browse files Browse the repository at this point in the history
… counting accordion boxes, shrink Compare total accordion boxes to make room, see #131
  • Loading branch information
chrisklus committed Feb 9, 2022
1 parent 6bb3dde commit 3ec5519
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion js/common/view/WordAccordionBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export type WordAccordionBoxOptions = WordAccordionBoxSelfOptions & NumberPlayAc
// constants
const TEXT_MARGIN = 5;


class WordAccordionBox extends NumberPlayAccordionBox {

constructor( currentNumberProperty: NumberProperty, isPrimaryLocaleProperty: BooleanProperty, height: number,
Expand Down
15 changes: 7 additions & 8 deletions js/compare/view/CompareScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ import CountingObjectType from '../../../../counting-common/js/common/model/Coun
import SpeechSynthesisAnnouncer from '../../../../utterance-queue/js/SpeechSynthesisAnnouncer.js';

// constants
const UPPER_ACCORDION_BOX_CONTENT_HEIGHT = 90; // in screen coordinates
const UPPER_ACCORDION_BOX_CONTENT_HEIGHT = 80; // in screen coordinates
const LOWER_ACCORDION_BOX_CONTENT_WIDTH = 390; // in screen coordinates
const LOWER_ACCORDION_BOX_CONTENT_HEIGHT = 437; // in screen coordinates

// strings
const lessThanString = '<';
Expand All @@ -61,12 +60,12 @@ class CompareScreenView extends ScreenView {
// config for the left and right TotalAccordionBox
const totalAccordionBoxOptions = {
fill: NumberPlayColors.whiteBackgroundColorProperty,
font: new PhetFont( 90 ),
font: new PhetFont( 78 ),
arrowButtonOptions: {
arrowWidth: 18, // empirically determined
arrowHeight: 18 // empirically determined
arrowWidth: 15, // empirically determined
arrowHeight: 15 // empirically determined
},
arrowButtonSpacing: 7 // empirically determined
arrowButtonSpacing: 5 // empirically determined
};

// create and add the left TotalAccordionBox
Expand All @@ -92,7 +91,7 @@ class CompareScreenView extends ScreenView {
model.leftPlayArea,
model.leftCountingObjectTypeProperty,
LOWER_ACCORDION_BOX_CONTENT_WIDTH,
LOWER_ACCORDION_BOX_CONTENT_HEIGHT, {
NumberPlayConstants.TWENTY_LOWER_ACCORDION_BOX_HEIGHT, {
countingObjectTypes: CountingObjectType.enumeration.values,
expandedProperty: this.leftCountingAccordionBoxExpandedProperty,
fill: NumberPlayColors.mediumPurpleBackgroundColorProperty
Expand All @@ -106,7 +105,7 @@ class CompareScreenView extends ScreenView {
model.rightPlayArea,
model.rightCountingObjectTypeProperty,
LOWER_ACCORDION_BOX_CONTENT_WIDTH,
LOWER_ACCORDION_BOX_CONTENT_HEIGHT, {
NumberPlayConstants.TWENTY_LOWER_ACCORDION_BOX_HEIGHT, {
countingObjectTypes: CountingObjectType.enumeration.values,
expandedProperty: this.rightCountingAccordionBoxExpandedProperty,
fill: NumberPlayColors.lightOrangeBackgroundColorProperty
Expand Down

0 comments on commit 3ec5519

Please sign in to comment.