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

commits at source.squeak.org commits at source.squeak.org
Fri May 8 09:06:23 UTC 2015


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

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

Name: Morphic-mt.970
Author: mt
Time: 8 May 2015, 11:05:37.172 am
UUID: 038037d4-21ee-d04e-8767-5d888876a367
Ancestors: Morphic-mt.969

Use a reduced minimum width fors buttons if they are #shrinkWrap.

Better for lower resolutions resp. tool window sizes.

=============== Diff against Morphic-mt.969 ===============

Item was changed:
  ----- Method: PluggableButtonMorph>>updateMinimumExtent (in category 'layout') -----
  updateMinimumExtent
  
  	| hMin vMin |
  	self label isMorph
  		ifTrue: [^ self minimumExtent: self label minExtent].
  
  	hMin := vMin := 0.
  	self hResizing == #shrinkWrap
+ 		ifTrue: [hMin := (self font widthOfString: self label)].
- 		ifTrue: [hMin := (self font widthOfString: self label) max: self labelShrinkThreshold].
  	self vResizing == #shrinkWrap
  		ifTrue: [vMin := self font height].
  
  	hMin := hMin + (2* self borderStyle width).
  	vMin := vMin + (2* self borderStyle width).
  			
  	self layoutInset isRectangle
  		ifTrue: [
  			hMin := hMin + self layoutInset left + self layoutInset right.
  			vMin := vMin + self layoutInset top + self layoutInset bottom]
  		ifFalse: [self layoutInset isPoint
  			ifTrue: [
  				hMin := hMin + (2* self layoutInset x).
  				vMin := vMin + (2* self layoutInset y)]
  			ifFalse: [
  				hMin := hMin + (2* self layoutInset).
  				vMin := vMin + (2* self layoutInset)]].
  	
  	self minimumExtent: hMin @ vMin.
  
  	"Since we have no submorphs, we have to resize here if we want to shrink wrap."
  	self hResizing == #shrinkWrap ifTrue: [self width: hMin].
  	self vResizing == #shrinkWrap ifTrue: [self height: vMin].!



More information about the Packages mailing list