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

commits at source.squeak.org commits at source.squeak.org
Fri Apr 24 09:50:08 UTC 2015


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

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

Name: Morphic-mt.921
Author: mt
Time: 24 April 2015, 11:49:03.996 am
UUID: 8d98866e-14a1-ee44-94d6-1685c5be67ea
Ancestors: Morphic-mt.920

More magic numbers removed from splitter/grip morph code.

=============== Diff against Morphic-mt.920 ===============

Item was removed:
- ----- Method: ProportionalSplitterMorph class>>splitterWidth (in category 'as yet unclassified') -----
- splitterWidth
- 
- 	^ 4!

Item was changed:
  ----- Method: ProportionalSplitterMorph>>handleSize (in category 'displaying') -----
  handleSize
  
+ 	^ self class gripThickness @ 30!
- 	^ self class splitterWidth @ 30!

Item was changed:
  ----- Method: SystemWindow>>addMorph:fullFrame: (in category 'panes') -----
  addMorph: aMorph fullFrame: aLayoutFrame
  	"Add aMorph according to aLayoutFrame."
  	| windowBorderWidth |
  	windowBorderWidth := self class borderWidth.
  	"If the property #allowPaneSplitters is set to false, do *not* inset morphs by the borderWidth
  	 to make room for splitters.  This allows windows with non-traditional contents to avoid their
  	 component morphs from being clipped.  Do *NOT* remove this code please!!  Just because
  	 there may be no setters of allowPaneSplitters to false in the image doesn't mean they're not
  	 out there.  Thanks!!  eem 6/13/2013"
  	(self valueOfProperty: #allowPaneSplitters ifAbsent: [true]) ifTrue:
  		[| left right bottom top |
  
  		left := aLayoutFrame leftOffset ifNil: [0].
  		right := aLayoutFrame rightOffset ifNil: [0].
  
  		bottom := aLayoutFrame bottomOffset ifNil: [0].
  		top := aLayoutFrame topOffset ifNil: [0].
  		
  		aLayoutFrame rightFraction = 1 ifTrue: [aLayoutFrame rightOffset: right - windowBorderWidth].
  		aLayoutFrame leftFraction = 0
  			ifTrue: [aLayoutFrame leftOffset: left + windowBorderWidth]
+ 			ifFalse: [aLayoutFrame leftOffset: left + ProportionalSplitterMorph gripThickness].
- 			ifFalse: [aLayoutFrame leftOffset: left + ProportionalSplitterMorph splitterWidth].
  
  		aLayoutFrame bottomFraction = 1 ifTrue: [aLayoutFrame bottomOffset: bottom - windowBorderWidth].
  		aLayoutFrame topFraction = 0
  			ifTrue: [aLayoutFrame topOffset: top + windowBorderWidth]
+ 			ifFalse: [aLayoutFrame topOffset: top + ProportionalSplitterMorph gripThickness]].
- 			ifFalse: [aLayoutFrame topOffset: top + ProportionalSplitterMorph splitterWidth]].
  
  	"this code should not be here!!!!  As of 6/13/2013 there aren't even any users of BrowserCommentTextMorph."
  	(aMorph class name = #BrowserCommentTextMorph) ifTrue:
  		[aLayoutFrame rightOffset: windowBorderWidth negated.
  		aLayoutFrame leftOffset: windowBorderWidth.
  		aLayoutFrame bottomOffset: windowBorderWidth negated.
  		aLayoutFrame topOffset: (windowBorderWidth negated) + 4].
  	
  	super addMorph: aMorph fullFrame: aLayoutFrame.
  
  	paneMorphs := paneMorphs copyReplaceFrom: 1 to: 0 with: (Array with: aMorph).
  	aMorph isImageMorph ifFalse: [aMorph adoptPaneColor: self paneColor].
  	Preferences scrollBarsOnRight ifTrue:"reorder panes so flop-out right-side scrollbar is visible"
  		[self addMorphBack: aMorph].
  		
  	self addPaneSplitters!



More information about the Squeak-dev mailing list