[squeak-dev] The Trunk: ToolBuilder-Morphic-mt.315.mcz

commits at source.squeak.org commits at source.squeak.org
Tue May 17 09:37:53 UTC 2022


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

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

Name: ToolBuilder-Morphic-mt.315
Author: mt
Time: 17 May 2022, 11:37:53.675268 am
UUID: 42b405ca-9459-c14e-96ff-0c776d55f8a7
Ancestors: ToolBuilder-Morphic-tpr.314

Complements System-mt.1352

=============== Diff against ToolBuilder-Morphic-tpr.314 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableWindow: (in category 'widgets required') -----
  buildPluggableWindow: aSpec
  	| widget |
  
  	aSpec layout == #proportional ifFalse:[
  		"This needs to be implemented - probably by adding a single pane and then the rest"
  		^self error: 'Not implemented'.
  	].
  
  	widget := (self windowClassFor: aSpec) new.
  	self register: widget id: aSpec name.
  	
  	widget model: aSpec model.
  
  	"Set child dependent layout properties."
  	MorphicProject worldGridEnabled ifTrue: [
  		"Snap both #position and #extent to grid."
  		aSpec horizontalResizing ifNil: [aSpec horizontalResizing: #spaceFill].
  		aSpec verticalResizing ifNil: [aSpec verticalResizing: #spaceFill]].		
  	self setLayoutHintsFor: widget spec: aSpec.
  	widget layoutInset: (aSpec padding ifNil: [self windowPadding]).
  	widget morphicLayerNumber: widget class windowLayer.
  	
  	"Performance. Flip the #wantsPaneSplitters flag only after all children where added."
  	widget cellGap: 0.
  	widget wantsPaneSplitters: false; wantsGrips: false.
  	widget removePaneSplitters; removeGrips.
  
  	"Now create the children."
  	panes := OrderedCollection new.
  	aSpec children isSymbol
  		ifTrue: [
  			widget getChildrenSelector: aSpec children.
  			widget update: aSpec children]
  		ifFalse: [
  			self buildAll: aSpec children in: widget].
  	widget setUpdatablePanesFrom: panes.
  
  	"Now that we have all children, let's add those splitters if necessary."
  	widget cellGap: (aSpec spacing ifNil: [self windowSpacing]).
  	widget wantsGrips: true; addGrips.
  	widget wantsPaneSplitters: (aSpec wantsResizeHandles ifNil: [true]).
  	widget wantsPaneSplitters ifTrue: [widget addPaneSplitters].
  
  	aSpec defaultFocus ifNotNil: [:name |
  		widget defaultFocusMorph: name].
  	
  	aSpec label ifNotNil: [:label|
  		label isSymbol 
  			ifTrue:[widget getLabelSelector: label]
  			ifFalse:[widget setLabel: label]].
  
  	aSpec multiWindowStyle notNil ifTrue:
  		[widget savedMultiWindowState: (SavedMultiWindowState on: aSpec model)].
  
  	widget closeWindowSelector: aSpec closeAction.
  	self buildHelpFor: widget spec: aSpec. 
  
  	widget bounds: (RealEstateAgent 
  		initialFrameFor: widget 
+ 		initialExtent: ((aSpec extent ifNil:[widget initialExtent]) * RealEstateAgent windowScaleFactor * RealEstateAgent scaleFactor) rounded
- 		initialExtent: ((aSpec extent ifNil:[widget initialExtent]) * RealEstateAgent scaleFactor) rounded
  		world: self currentWorld).
  
  	widget refreshWindowColor.
  
  	^ widget!



More information about the Squeak-dev mailing list