[Pkg] The Trunk: ToolBuilder-Morphic-mt.94.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Mar 1 20:19:16 UTC 2015

Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:

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

Name: ToolBuilder-Morphic-mt.94
Author: mt
Time: 1 March 2015, 9:19:10.471 pm
UUID: 1fb0b656-e93e-2540-8164-a993206d8cce
Ancestors: ToolBuilder-Morphic-mt.93

Fixed creation of pluggable scroll pane. Failed to use correct interface for #whenNeeded behavior of scroll bars.

=============== Diff against ToolBuilder-Morphic-mt.93 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableScrollPane: (in category 'widgets optional') -----
  buildPluggableScrollPane: spec
  	| widget |
  	widget := self scrollPaneClass new.
  	widget model: spec model.
  	self register: widget id: spec name.
  	spec children
  		ifNotNil: [:obj |
  			"Create panel morph to scroll it."
  			widget morph: (self pluggablePanelSpec new
  				children: obj;
  				layout: spec layout;
  				frame: (0 at 0 corner: 1 at 1);
  				buildWith: self).
  			spec layout ~~ #proportional ifTrue: [
  				"Fix #spaceFill resizing because it does not make sense in scroll pane."
  				widget morph
  					hResizing: #shrinkWrap;
  					vResizing: #shrinkWrap.
  				widget morph submorphsDo: [:m |
  						extent: 100 at 100;
  						flag: #refactor; "mt: Restore orginial properties?"
  						hResizing: #rigid;
  						vResizing: #rigid]
  		ifNil: [spec morph
  			ifNotNil: [:m | widget morph: m]
  			ifNil: [widget morphClass: spec morphClass]].
  	self setFrame: spec frame in: widget.
  	parent ifNotNil: [self add: widget to: parent].
  	widget borderWidth: spec borderWidth.
  	spec hScrollBarPolicy caseOf: {
  		[#always] -> [widget alwaysShowHScrollBar: true].
  		[#never] -> [widget hideHScrollBarIndefinitely: true].
+ 		[#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded: false]}.
- 		[#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded: true]}.
  	spec vScrollBarPolicy caseOf: {
  		[#always] -> [widget alwaysShowVScrollBar: true].
  		[#never] -> [widget hideVScrollBarIndefinitely: true].
+ 		[#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded: false]}.
- 		[#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded: true]}.
  	^ widget!

More information about the Packages mailing list