The Trunk: MorphicExtras-ct.362.mcz

[email protected] Fri, 31 Jul 2026 08:47:24 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ct.362.mcz

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

Name: MorphicExtras-ct.362
Author: ct
Time: 28 July 2026, 10:03:40.92654 pm
UUID: 0ae29944-6260-4c73-bd2b-be27d21c25aa
Ancestors: MorphicExtras-mt.361

Revises the new Objectland starter by customizing the existing project window instead of maintaining an individual composition:
- Proposal: Moves the protruding close button onto the top left corner of the starter instead.
- Ensures the project starter normally disappears after closing the project from within (e.g., through its own close button morph). (Project view windows do this automatically - see MorphicProject>>#deletingProject:.)
- Readds a single confirmation dialog before closing the objectland project (via System-ct.1528, that will be a single dialog only again, not 6 dialogs for each nested projects).
- Fixes the starter and the close box to react to scale factor changes, which the user might perform from the preference wizard.
- Fixes the close box to react to mouse over.
Depends on Morphic-ct.2224 (SystemWindow>>removeLabelArea).

Improves multilingual support.

=============== Diff against MorphicExtras-mt.361 ===============

Item was changed:
  ----- Method: ObjectlandMorph class>>createObjectlandProject (in category 'instance creation') -----
  createObjectlandProject
  
  	| projectWindow |
  	projectWindow := Project current world
+ 		submorphThat: [:m | (m model isKindOf: Project) and: [m model name beginsWith: 'The Worlds of Squeak' translated]]
- 		submorphThat: [:m | (m model isKindOf: Project) and: [m model name beginsWith: 'The Worlds of Squeak']]
  		ifNone: [^ self new createObjectlandProject].
  	^ projectWindow beKeyWindow!

Item was changed:
  ----- Method: ObjectlandMorph class>>createObjectlandProjectStarter (in category 'instance creation') -----
  createObjectlandProjectStarter
  	"Lean version of the Objectland morph, without window borders."
  
  	^ Project current world
+ 		submorphThat: [:m | m externalName beginsWith: 'The Worlds of Squeak' translated]
+ 		ifNone: [ObjectlandStarterMorph makeFrom: self new createObjectlandProject]!
- 		submorphThat: [:m | m externalName beginsWith: 'The Worlds of Squeak']
- 		ifNone: [ | projectMorph objectlandStarterPanel |
- 			projectMorph := self new
- 				createObjectlandProject "window"
- 				paneMorphs first. "project morph"
- 			projectMorph
- 				hResizing: #rigid;
- 				vResizing: #rigid;
- 				addDropShadow.
- 			
- 			objectlandStarterPanel := Morph new
- 				beSticky;
- 				name: projectMorph project name;
- 				color: Color transparent;
- 				changeTableLayout;
- 				listDirection: #leftToRight;
- 				hResizing: #shrinkWrap;
- 				vResizing: #shrinkWrap;
- 				cellPositioning: #topLeft;
- 				cellGap: 5px;
- 				yourself.
- 			objectlandStarterPanel
- 				addMorph: projectMorph;
- 				addMorph: (SystemWindow closeBoxImage scaleIconToDisplay asMorph
- 					on: #click send: #value to: [projectMorph expungeProjectSilently. objectlandStarterPanel delete]; 
- 					yourself).
- 
- 			objectlandStarterPanel]!

Item was added:
+ SystemWindow subclass: #ObjectlandStarterMorph
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'MorphicExtras-Demo'!

Item was added:
+ ----- Method: ObjectlandStarterMorph class>>makeFrom: (in category 'instance creation') -----
+ makeFrom: projectWindow
+ 
+ 	^ (projectWindow changeClassTo: self)
+ 		initializeStarter!

Item was added:
+ ----- Method: ObjectlandStarterMorph>>addCloseBox (in category 'initialization') -----
+ addCloseBox
+ 
+ 	| boxOutline |
+ 	closeBox ifNotNil: [closeBox delete].
+ 	closeBox := self createCloseBox.
+ 	closeBox layoutFrame: self class closeBoxFrame.
+ 	
+ 	closeBox extent: closeBox extent + 3 px "margin".
+ 	boxOutline := EllipseMorph new
+ 		color: Color black; borderWidth: 0 px;
+ 		extent: closeBox firstSubmorph extent + (2 px * 2);
+ 		center: closeBox firstSubmorph center;
+ 		yourself.
+ 	closeBox addMorphBack: boxOutline.
+ 	
+ 	self addMorph: closeBox.!

Item was added:
+ ----- Method: ObjectlandStarterMorph>>applyUserInterfaceTheme (in category 'user interface') -----
+ applyUserInterfaceTheme
+ 
+ 	super applyUserInterfaceTheme.
+ 	
+ 	self borderWidth: 0.
+ 	self addCloseBox.!

Item was added:
+ ----- Method: ObjectlandStarterMorph>>displayScaleChangedBy: (in category 'layout') -----
+ displayScaleChangedBy: factor
+ 
+ 	super displayScaleChangedBy: factor.
+ 	
+ 	closeBox extent: self boxExtent.!

Item was added:
+ ----- Method: ObjectlandStarterMorph>>initializeStarter (in category 'initialization') -----
+ initializeStarter
+ 
+ 	self removeLabelArea.
+ 	self
+ 		wantsGrips: false;
+ 		borderWidth: 0;
+ 		addCloseBox.!

Item was added:
+ ----- Method: ObjectlandStarterMorph>>lookUnfocused (in category 'focus') -----
+ lookUnfocused
+ 	"Do nothing."!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]