[squeak-dev] The Trunk: ToolBuilder-Morphic-ar.39.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Sep 19 05:08:14 UTC 2009


Andreas Raab uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ar.39.mcz

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

Name: ToolBuilder-Morphic-ar.39
Author: ar
Time: 18 September 2009, 10:08:06 am
UUID: cc63fa8f-3ec6-4a45-9deb-873ef65e0c8a
Ancestors: ToolBuilder-Morphic-laza.38

Face Lift: A few tweaks for MorphicToolBuilder to make it work better with Botox.

=============== Diff against ToolBuilder-Morphic-laza.38 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>setLayout:in: (in category 'private') -----
  setLayout: layout in: widget
  	layout == #proportional ifTrue:[
  		widget layoutPolicy: ProportionalLayout new.
  		^self].
  	layout == #horizontal ifTrue:[
  		widget layoutPolicy: TableLayout new.
  		widget listDirection: #leftToRight.
  		widget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].
+ 		widget cellInset: 1 at 1.
+ 		widget layoutInset: 1 at 1.
+ 		widget color: Color transparent.
  		"and then some..."
  		^self].
  	layout == #vertical ifTrue:[
  		widget layoutPolicy: TableLayout new.
  		widget listDirection: #topToBottom.
  		widget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].
+ 		widget cellInset: 1 at 1.
+ 		widget layoutInset: 1 at 1.
+ 		widget color: Color transparent.
  		"and then some..."
  		^self].
  	^self error: 'Unknown layout: ', layout.!

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggablePanel: (in category 'pluggable widgets') -----
  buildPluggablePanel: aSpec
  	| widget children frame |
  	widget := PluggablePanelMorph new.
  	self register: widget id: aSpec name.
  	widget model: aSpec model.
  	widget color: Color transparent.
  	widget clipSubmorphs: true.
  	children := aSpec children.
  	children isSymbol ifTrue:[
  		widget getChildrenSelector: children.
  		widget update: children.
  		children := #().
  	].
  	self buildAll: children in: widget.
  	self setFrame: aSpec frame in: widget.
  	parent ifNotNil:[self add: widget to: parent].
  	self setLayout: aSpec layout in: widget.
  	widget layoutInset: 0.
  	widget borderWidth: 0.
  	widget submorphsDo:[:sm|
  		(frame := sm layoutFrame) ifNotNil:[
  			(frame rightFraction = 0 or:[frame rightFraction = 1]) 
  				ifFalse:[frame rightOffset:1].
  			(frame bottomFraction = 0 or:[frame bottomFraction = 1]) 
  				ifFalse:[frame bottomOffset: 1]]].
+ 	widget color: Color transparent.
  	^widget!

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableCodePane: (in category 'pluggable widgets') -----
  buildPluggableCodePane: aSpec
  	"Install the default styler for code panes.
  	Implementation note: We should just be doing something like, e.g.,
  		^(self buildPluggableText: aSpec) useDefaultStyler
  	Unfortunately, this will retrieve and layout the initial text twice which
  	can make for a noticable performance difference when looking at some
  	larger piece of code. So instead we copy the implementation from 
  	buildPlugggableText: here and insert #useDefaultStyler at the right point"
  	| widget |
  	widget := PluggableTextMorphPlus new.
  	widget useDefaultStyler.
  	widget on: aSpec model
  				text: aSpec getText 
  				accept: aSpec setText
  				readSelection: aSpec selection 
  				menu: aSpec menu.
  	widget font: Preferences standardCodeFont.
  	self register: widget id: aSpec name.
  	widget getColorSelector: aSpec color.
  	self setFrame: aSpec frame in: widget.
  	parent ifNotNil:[self add: widget to: parent].
  	widget borderColor: Color lightGray.
+ 	widget color: Color white.
  	^widget!

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableText: (in category 'pluggable widgets') -----
  buildPluggableText: aSpec
  	| widget |
  	widget := PluggableTextMorphPlus on: aSpec model
  				text: aSpec getText 
  				accept: aSpec setText
  				readSelection: aSpec selection 
  				menu: aSpec menu.
  	widget font: Preferences standardCodeFont.
  	self register: widget id: aSpec name.
  	widget getColorSelector: aSpec color.
  	self setFrame: aSpec frame in: widget.
  	parent ifNotNil:[self add: widget to: parent].
  	widget borderColor: Color lightGray.
+ 	widget color: Color white.
  	^widget!




More information about the Squeak-dev mailing list