The Trunk: MorphicExtras-mt.364.mcz

[email protected] Fri, 31 Jul 2026 08:45:58 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-mt.364.mcz

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

Name: MorphicExtras-mt.364
Author: mt
Time: 31 July 2026, 10:45:57.362032 am
UUID: 26b90113-f417-eb48-8f61-830f72cd7b99
Ancestors: MorphicExtras-mt.362, MorphicExtras-ct.363

Merges MorphicExtras-ct.363 for a more robust Objectland starter.

=============== Diff against MorphicExtras-mt.362 ===============

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]]
  		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]!
- 		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
+ 	"Overwritten to let the closeBox reach out the left edge."
+ 
+ 	closeBox ifNotNil: [closeBox delete].
+ 	closeBox := self createCloseBox.
+ 	closeBox layoutFrame: (LayoutFrame new leftFraction: 0; leftOffset: -5 px - closeBox width; topFraction: 0; topOffset: 0; yourself).
+ 	
+ 	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>>closeBoxHit (in category 'open/close') -----
+ closeBoxHit
+ 
+ 	self projectView expungeProjectSilently.
+ 	self delete.!

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

Item was added:
+ ----- Method: ObjectlandStarterMorph>>hasDropShadow: (in category 'initialization') -----
+ hasDropShadow: bool
+ 	"Never deactivate the drop shadow"
+ 	
+ 	^ super hasDropShadow: true!

Item was added:
+ ----- Method: ObjectlandStarterMorph>>initialExtent (in category 'initialization') -----
+ initialExtent
+ 
+ 	 ^ 200 @ (200.0 * (Display height / Display width)) rounded!

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

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

Item was added:
+ ----- Method: ObjectlandStarterMorph>>outerBounds (in category 'geometry') -----
+ outerBounds
+ 	"Overwritten to consider the protruding closeBox."
+ 	| box |
+ 	box := super outerBounds.
+ 	closeBox ifNotNil: [box := box quickMerge: closeBox bounds].
+ 	^box!

Item was added:
+ ----- Method: ObjectlandStarterMorph>>projectView (in category 'accessing') -----
+ projectView
+ 
+ 	^ self paneMorphs first!

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