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

commits at source.squeak.org commits at source.squeak.org
Sun May 3 08:38:31 UTC 2015


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

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

Name: Morphic-mt.961
Author: mt
Time: 3 May 2015, 10:37:41.57 am
UUID: 9d90662f-0ca8-be4f-955b-15ceef53104b
Ancestors: Morphic-mt.960

Fixed shrinkWrap-bug in buttons.

=============== Diff against Morphic-mt.960 ===============

Item was changed:
  ----- Method: PluggableButtonMorph>>updateMinimumExtent (in category 'layout') -----
  updateMinimumExtent
  
  	| hMin vMin |
  	self label isMorph
  		ifTrue: [^ self minimumExtent: self label minExtent].
  
  	hMin := vMin := 16.
  	self hResizing == #shrinkWrap
  		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].!
- 	self minimumExtent: hMin @ vMin!



More information about the Packages mailing list