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

commits at source.squeak.org commits at source.squeak.org
Thu Jan 26 09:21:00 UTC 2023


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

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

Name: Morphic-mt.2075
Author: mt
Time: 26 January 2023, 10:20:57.216707 am
UUID: 6f66e69c-5e99-1d4b-abdf-1d4235feae4a
Ancestors: Morphic-mt.2074

Performance slightly improved for larger tree widgets.

=============== Diff against Morphic-mt.2074 ===============

Item was changed:
  ----- Method: IndentingListItemMorph>>backgroundColor: (in category 'accessing') -----
  backgroundColor: aColor
+ 	
+ 	backgroundColor = aColor ifTrue: [^ self].
  	backgroundColor := aColor.
  	self changed.!

Item was changed:
  ----- Method: IndentingListItemMorph>>fitContents (in category 'layout') -----
  fitContents
  
+ 	self extent: container preferredSubmorphWidth @ self fontToUse lineGridForMorphs.!
- 	super fitContents.
- 	self width: container preferredSubmorphWidth.!

Item was changed:
  ----- Method: IndentingListItemMorph>>initWithColor:andFont: (in category 'initialization') -----
  initWithColor: aColor andFont: aFont
  	"Configure the receiver with aColor and aFont as prescribed by the owning tree morph. Ignore a property if overridden from text label. See #initializeFromText:.
  	That is, a tree morph prescribes a certain appearance for all its items, which it will constantly create and destroy as users collapse and expand items in the tree. During construction of each item, any text label will be set *before* calling this method. So we can check #hasColorFromText and other flags that will help us decide whether to keep a property or not."
  
  	(self hasProperty: #hasColorFromText)
  		ifFalse: [self color: aColor].
  
  	(self hasProperty: #hasEmphasisFromText)
  		ifTrue: [
  			(self hasProperty: #hasFontFromText)
  				ifFalse: [self font: aFont "Keeps emphasis from text."]]
  		ifFalse: [
  			(self hasProperty: #hasFontFromText)
  				ifTrue: [self emphasis: aFont emphasis "Keeps font from text."]
+ 				ifFalse: [self setFont: aFont emphasis: nil]]
- 				ifFalse: [self font: aFont emphasis: aFont emphasis]]
  !

Item was changed:
  ----- Method: IndentingListItemMorph>>initWithContents:prior:forList:indentLevel: (in category 'initialization') -----
  initWithContents: anObject prior: priorMorph forList: hostList indentLevel: newLevel
  
  	container := hostList.
  	
  	complexContents := anObject.
  	anObject addDependent: self.
  	
  	self initWithContents: self getLabel font: Preferences standardListFont emphasis: nil.
  	indentLevel := 0.
  	isExpanded := false.
   	nextSibling := firstChild := nil.
  	priorMorph ifNotNil: [
  		priorMorph nextSibling: self.
  	].
  	indentLevel := newLevel.
+ 	icon := self getIcon ifNotNil: [:form | form scaleIconToDisplay].!
- 	icon := self getIcon ifNotNil: [:form | form scaleIconToDisplay].
- 	self extent: self minWidth @ self minHeight!

Item was changed:
  ----- Method: SimpleHierarchicalListMorph>>adjustSubmorphPositions (in category 'private') -----
  adjustSubmorphPositions
  
  	| p |
  	p := 0 at 0.
  	scroller submorphsDo: [ :each | | h |
  		each visible ifTrue: [
  			h := each height.
  			each privateBounds: (p extent: self preferredSubmorphWidth at h).
  			p := p + (0 at h) ]].
+ 	scroller layoutChanged.
  	self 
  		clearColumnsCache;
  		changed;
  		layoutChanged;
  		setScrollDeltas.
  !

Item was changed:
  ----- Method: StringMorph>>emphasis (in category 'accessing') -----
  emphasis
  	"self assert: emphasis = self font emphasis"
  	
+ 	^ emphasis ifNil: [emphasis := font emphasis]!
- 	^ emphasis!

Item was changed:
  ----- Method: StringMorph>>font:emphasis: (in category 'accessing - convenience') -----
  font: aFontOrNil emphasis: emphasisCodeOrNil
  	"For convenience only. Try to use #font: and #emphasis: instead.
  	
  	Changes font and/or emphasis. If both are given, the font's current emphasis will be discarded. If only the emphasis is given, the system's default font will be used. If only the font is given, the font's emphasis will be cached so that future calls to #font: will keep the emphasis."
  
  	self
  		assert: aFontOrNil notNil | emphasisCodeOrNil notNil
  		description: 'Either font or emphasis must be non-nil.'.
  		
  	self
+ 		setFont: ((aFontOrNil isNil or: [emphasisCodeOrNil isNil] or: [aFontOrNil emphasis = emphasisCodeOrNil])
- 		setFont: ((aFontOrNil isNil or: [aFontOrNil emphasis = emphasisCodeOrNil] or: [emphasisCodeOrNil isNil])
  			ifTrue: [aFontOrNil]
  			ifFalse: [aFontOrNil emphasized: emphasisCodeOrNil])
+ 		emphasis: emphasisCodeOrNil.
- 		emphasis: (emphasisCodeOrNil ifNil: [aFontOrNil emphasis]).
  		
  	"self assert: self font emphasis = self emphasis. --- mt: Does not always work because of how StrikeFont treats emphasis 0 in #emphasized:."!



More information about the Squeak-dev mailing list