[Pkg] The Trunk: Morphic-mt.928.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Apr 25 15:35:03 UTC 2015


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

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

Name: Morphic-mt.928
Author: mt
Time: 25 April 2015, 5:34:17.411 pm
UUID: 4e5eff74-57f5-874f-8c39-d05524ebc06c
Ancestors: Morphic-mt.927

Minor adaption to text morph to update its minimum height at the place where its text morph is initialized because only then he can answer #isAutoFit correctly.

=============== Diff against Morphic-mt.927 ===============

Item was changed:
  ----- Method: PluggableTextMorph>>isAutoFit (in category 'accessing') -----
  isAutoFit
  
+ 	^ textMorph notNil and: [textMorph isAutoFit]!
- 	^ textMorph isAutoFit!

Item was removed:
- ----- Method: PluggableTextMorph>>minScrollbarHeight (in category 'geometry') -----
- minScrollbarHeight
- 	"We never have a horizontal scroll bar if we wrap text."
- 	
- 	^ (textMorph notNil and: [textMorph isAutoFit])
- 		ifTrue: [self vScrollBarPolicy == #never 
- 			ifTrue:[0] ifFalse:[scrollBar minHeight]]
- 		ifFalse: [super minScrollbarHeight]!

Item was removed:
- ----- Method: PluggableTextMorph>>minScrollbarWidth (in category 'geometry') -----
- minScrollbarWidth
- 	"We never have a horizontal scroll bar if we wrap text."
- 	
- 	^ (textMorph notNil and: [textMorph isAutoFit])
- 		ifTrue: [(retractableScrollBar or: [self vScrollBarPolicy == #never]) 
- 			ifTrue:[0] ifFalse:[self scrollBarThickness]]
- 		ifFalse: [super minScrollbarWidth]!

Item was changed:
  ----- Method: PluggableTextMorph>>setText: (in category 'model access') -----
  setText: aText
  	textMorph
  		ifNil: [textMorph := self textMorphClass new
  					contents: aText
  					wrappedTo: self innerBounds width.
  				textMorph
  					margins: (3 at 0 corner: 0 at 0);
  					setEditView: self;
  					setProperty: #indicateKeyboardFocus toValue: #never.
+ 				scroller addMorph: textMorph.
+ 				"Reset minExtent because only now we can anser #isAutoFit correctly."
+ 				self minimumExtent: 0 at 0; updateMinimumExtent]
- 				scroller addMorph: textMorph]
  		ifNotNil: [textMorph newContents: aText].
  	self hasUnacceptedEdits: false.
  	self setScrollDeltas.!

Item was changed:
  ----- Method: ScrollPane>>minScrollbarHeight (in category 'layout') -----
  minScrollbarHeight
  	"Answer the minimum extent occupied by the receiver..
  	It is assumed the if the receiver is sized to its minimum both scrollbars will be used (and visible) unless they have been turned off explicitly.
  	This makes the behaviour also more predictable."
  	
  	^ (self vScrollBarPolicy == #never 
  		ifTrue: [0]
  		ifFalse: [scrollBar minHeight])
+ 			+ (((self hScrollBarPolicy == #never or: [retractableScrollBar]) or: [self isAutoFit])
- 			+ (retractableScrollBar
  				ifTrue: [0]
+ 				ifFalse: [self scrollBarThickness])!
- 				ifFalse: [self hScrollBarPolicy == #never 
- 					ifTrue:[0]
- 					ifFalse:[self scrollBarThickness]])!

Item was changed:
  ----- Method: ScrollPane>>minScrollbarWidth (in category 'layout') -----
  minScrollbarWidth
  	"Answer the minimum extent occupied by the receiver..
  	It is assumed the if the receiver is sized to its minimum both scrollbars will be used (and visible) unless they have been turned off explicitly.
  	This makes the behaviour also more predictable."
  	
+ 	^ ((self hScrollBarPolicy == #never or: [self isAutoFit])
- 	^ (self hScrollBarPolicy == #never 
  		ifTrue: [0]
  		ifFalse: [hScrollBar minWidth])
+ 			+ ((retractableScrollBar or: [self vScrollBarPolicy == #never])
- 			+ (retractableScrollBar
  				ifTrue: [0]
+ 				ifFalse: [self scrollBarThickness])!
- 				ifFalse: [self vScrollBarPolicy == #never 
- 					ifTrue:[0]
- 					ifFalse:[self scrollBarThickness]])!



More information about the Packages mailing list