The Trunk: Morphic-mt.963.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.963.mcz

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

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

Name: Morphic-mt.963
Author: mt
Time: 3 May 2015, 12:06:00.724 pm
UUID: 094b8452-a15c-6c44-9078-fb9c3b23a44f
Ancestors: Morphic-mt.962

Removed hard-coded extent of 16@16 for non-shrinkwrapped buttons when calculating the minimum extent.

=============== Diff against Morphic-mt.962 ===============

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