A new version of MorphicExtras was added to project The Inbox: http://source.squeak.org/inbox/MorphicExtras-kfr.332.mcz
==================== Summary ====================
Name: MorphicExtras-kfr.332 Author: kfr Time: 27 August 2022, 10:21:16.96379 am UUID: de15d415-f740-1e44-ab59-b1a8370e62a8 Ancestors: MorphicExtras-ct.331
Change the background color for the instrument to visually indicate that it is a changeable value
=============== Diff against MorphicExtras-ct.331 ===============
Item was changed: ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category 'layout') ----- trackNumAndMuteButtonFor: trackIndex
+ | muteButton instSelector pianoRollColor r instBackground | - | muteButton instSelector pianoRollColor r | muteButton := SimpleSwitchMorph new onColor: (Color r: 1.0 g: 0.6 b: 0.6); offColor: color; color: color; label: 'Mute' translated; target: scorePlayer; actionSelector: #mutedForTrack:put:; arguments: (Array with: trackIndex). + instBackground := Morph new extent: 125 px@19 px; + color: color lighter; + borderColor: color muchDarker; + borderWidth: 1; + layoutPolicy: TableLayout new; + layoutInset: (1@0). instSelector := DropDownChoiceMorph new extent: 120 px @ 18 px; contentsClipped: 'oboe1'; target: self; actionSelector: #atTrack:from:selectInstrument:; getItemsSelector: #instrumentChoicesForTrack:; getItemsArgs: (Array with: trackIndex). instSelector arguments: (Array with: trackIndex with: instSelector). instrumentSelector at: trackIndex put: instSelector. + instBackground addMorphBack: instSelector.
"select track color using same color list as PianoRollScoreMorph" pianoRollColor := (Color wheel: scorePlayer score tracks size) at: trackIndex.
r := self makeRow hResizing: #spaceFill; vResizing: #spaceFill; extent: 70 px @ 10 px. r addMorphBack: ((StringMorph contents: trackIndex printString font: (TextStyle defaultFont asPointSize: TextStyle defaultFont pointSize * 1.57)) color: pianoRollColor). trackIndex < 10 ifTrue: [r addMorphBack: (Morph new color: color; extent: 19 px @ 8 px)] "spacer" ifFalse: [r addMorphBack: (Morph new color: color; extent: 8 px @ 8 px)]. "spacer" r addMorphBack: (StringMorph new + extent: 100 px @ 16 px; - extent: 140 px @ 16 px; contentsClipped: (scorePlayer infoForTrack: trackIndex)). r addMorphBack: (Morph new color: color; extent: 8 px @ 8 px). "spacer" + r addMorphBack: instBackground. - r addMorphBack: instSelector. r addMorphBack: (AlignmentMorph newRow color: color). "spacer" r addMorphBack: muteButton. ^ r!
squeak-dev@lists.squeakfoundation.org