[squeak-dev] The Trunk: MorphicExtras-ct.329.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 25 13:48:06 UTC 2022


Christoph Thiede uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ct.329.mcz

==================== Summary ====================

Name: MorphicExtras-ct.329
Author: ct
Time: 25 August 2022, 3:48:03.569239 pm
UUID: b7b5c235-4960-2644-9e19-9bc424db05e5
Ancestors: MorphicExtras-ct.328

Score Player: For instrument selection, uses a DropDownChoiceMorph in favor of a PopUpChoiceMorph.

=============== Diff against MorphicExtras-ct.328 ===============

Item was changed:
  ----- Method: DropDownChoiceMorph>>drawOn: (in category 'drawing') -----
  drawOn: aCanvas
  
+ 	aCanvas drawString: contents in: (bounds insetBy: 2 px) font: self fontToUse color: color.
- 	aCanvas drawString: contents in: (bounds insetBy: 2)  font: self fontToUse color: color.
  
  	border ifNotNil: [aCanvas frameAndFillRectangle: bounds
  		fillColor: Color transparent
+ 		borderWidth: 1 px
- 		borderWidth: 1
  		borderColor: Color black].
  
  	aCanvas
  			paintImage: SubMenuMarker
+ 			at: (self right - 8 px @ ((self top + self bottom - SubMenuMarker height) // 2))!
- 			at: (self right - 8 @ ((self top + self bottom - SubMenuMarker height) // 2))!

Item was changed:
  ----- Method: DropDownChoiceMorph>>maxExtent: (in category 'drawing') -----
  maxExtent: listOfStrings
  
  	| h maxW |
  	maxW := 0.
  	listOfStrings do: [:str | | f w |
  		f := self fontToUse.
  		w := f widthOfString: str.
  		h := f height.
  		maxW := maxW max: w].
+ 	self extent: (maxW + 4 px + h) @ (h + 4 px).
- 	self extent: (maxW + 4 + h) @ (h + 4).
  	self changed!

Item was changed:
  ----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category 'layout') -----
  trackNumAndMuteButtonFor: trackIndex
  
  	| 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).
+ 	instSelector := DropDownChoiceMorph new
+ 		extent: 120 px @ 18 px;
- 	instSelector := PopUpChoiceMorph new
- 		extent: 95 px @ 14 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.
  
  	"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: 140 px @ 16 px;
- 			extent: 80 px @ 14 px;
  			contentsClipped: (scorePlayer infoForTrack: trackIndex)).
  	r addMorphBack: (Morph new color: color; extent: 8 px @ 8 px).  "spacer"
  	r addMorphBack: instSelector.
  	r addMorphBack: (AlignmentMorph newRow color: color).  "spacer"
  	r addMorphBack: muteButton.
  	^ r!



More information about the Squeak-dev mailing list