Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1065.mcz==================== Summary ====================
Name: Morphic-mt.1065
Author: mt
Time: 13 January 2016, 9:06:34.13368 am
UUID: f53e7ff7-7ad1-4818-a1ec-1041d5de5617
Ancestors: Morphic-mt.1064
Fixes the other (forgotten *sigh*) cases where rounded rectangles degrade to ovals, which looks rather ugly, for example, in narrow, rounded scroll bars.
=============== Diff against Morphic-mt.1064 ===============
Item was changed:
----- Method: FormCanvas>>fillRoundRect:radius:fillStyle: (in category 'drawing-rectangles') -----
fillRoundRect: aRectangle radius: radius fillStyle: fillStyle
fillStyle isTransparent ifTrue:[^self].
radius asPoint <= (0@0)
ifTrue:[^self fillRectangle: aRectangle fillStyle: fillStyle].
- (radius * 2) asPoint >= aRectangle extent
- ifTrue:[^self fillOval: aRectangle fillStyle: fillStyle].
fillStyle isSolidFill
ifFalse:[^self balloonFillRoundRect: aRectangle radius: radius fillStyle: fillStyle].
self setFillColor: (shadowColor ifNil:[fillStyle asColor]).
^port fillRoundRect: (aRectangle translateBy: origin) truncated radius: radius.
!
Item was changed:
----- Method: FormCanvas>>frameAndFillRoundRect:radius:fillStyle:borderWidth:borderColor: (in category 'drawing-rectangles') -----
frameAndFillRoundRect: aRectangle radius: cornerRadius fillStyle: fillStyle borderWidth: bw borderColor: bc
"Draw a rounded rectangle"
self shadowColor ifNotNil:[
^self fillRoundRect: aRectangle radius: cornerRadius fillStyle: shadowColor.
].
"see if the round rect is degenerate"
cornerRadius asPoint <= (0@0)
ifTrue:[^self frameAndFillRectangle: aRectangle fillColor: fillStyle asColor borderWidth: bw borderColor: bc].
- cornerRadius * 2 >= aRectangle width
- ifTrue:[^self fillOval: aRectangle color: fillStyle asColor borderWidth: bw borderColor: bc].
"Okay it's a rounded rectangle"
fillStyle isTransparent ifFalse:["fill interior"
| innerRect radius |
innerRect := aRectangle.
radius := cornerRadius.
bw isZero ifFalse:[
innerRect := innerRect insetBy: bw.
radius := radius - bw.
].
self fillRoundRect: innerRect radius: radius fillStyle: fillStyle.
].
self frameRoundRect: aRectangle radius: cornerRadius width: bw color: bc
!