[squeak-dev] The Trunk: EToys-ct.478.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 25 10:49:27 UTC 2022


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

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

Name: EToys-ct.478
Author: ct
Time: 25 August 2022, 12:49:22.03798 pm
UUID: 009fb68f-4424-e944-90f5-9e531667c680
Ancestors: EToys-ct.477

Spectrum Analyzer: Reflect status changes in label text (in addition to existing label color)

=============== Diff against EToys-ct.477 ===============

Item was changed:
  ----- Method: SpectrumAnalyzerMorph>>step (in category 'stepping and presenter') -----
  step
  	"Update the record light, level meter, and display."
  
  	| w |
  	"update the record light and level meter"
+ 	statusLight color:
+ 		(soundInput isRecording ifTrue: [Color yellow] ifFalse: [Color gray]).
+ 	statusLight firstSubmorph in: [:stringMorph |
+ 		stringMorph contents:
+ 			(soundInput isRecording ifTrue: ['On' translated] ifFalse: ['Off' translated]).
+ 		stringMorph position: statusLight center - (stringMorph extent // 2)].
+ 	
- 	soundInput isRecording
- 		ifTrue: [statusLight color: Color yellow]
- 		ifFalse: [statusLight color: Color gray].
  	w := ((121 * soundInput meterLevel) // 100) max: 1.
+ 	levelMeter width: w.
+ 	
- 	levelMeter width ~= w ifTrue: [levelMeter width: w].
- 
  	"update the display if any data is available"
+ 	self updateDisplay.!
- 	self updateDisplay.
- !



More information about the Squeak-dev mailing list