[squeak-dev] The Trunk: ST80-mt.284.mcz

commits at source.squeak.org commits at source.squeak.org
Tue May 3 12:07:28 UTC 2022


Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.284.mcz

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

Name: ST80-mt.284
Author: mt
Time: 3 May 2022, 2:07:21.937631 pm
UUID: cd29b35c-0a0b-444e-a3bd-b9e9310a8983
Ancestors: ST80-ct.283

Merges mvcLineLengthDialogs.1.cs

https://lists.squeakfoundation.org/pipermail/squeak-dev/2022-April/219789.html

Adds a line-length limit to MVC dialogs. Complements Morphic-mt.1935. Due to the recent elimination of #withCRs in many places, this change has been overdue for an even longer time.

Example (to be run in an MVC project):
    self inform: Object comment

=============== Diff against ST80-ct.283 ===============

Item was changed:
  ----- Method: PopUpMenu>>mvcStartUpWithCaption:icon:at:allowKeyboard: (in category '*ST80-Menus') -----
  mvcStartUpWithCaption: captionOrNil icon: aForm at: location allowKeyboard: aBoolean
  	"Display the menu, with caption if supplied. Wait for the mouse button to go down, then track the selection as long as the button is pressed. When the button is released,
  	Answer the index of the current selection, or zero if the mouse is not released over  any menu item. Location specifies the desired topLeft of the menu body rectangle. The final argument indicates whether the menu should seize the keyboard focus in order to allow the user to navigate it via the keyboard."
  
  	frame ifNil: [self computeForm].
  	Cursor normal showWhile:
  		[self
  			displayAt: location
+ 			withCaption: (captionOrNil ifNotNil: [
+ 				"This is a compromise. See commentary in DialogWindow >> #message:."
+ 				captionOrNil withNoLineLongerThan: (captionOrNil size > 900 ifTrue: [65] ifFalse: [45])])
- 			withCaption: captionOrNil
  			during: [self controlActivity]].
  	^ selection!



More information about the Squeak-dev mailing list