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

commits at source.squeak.org commits at source.squeak.org
Wed Mar 4 17:49:53 UTC 2015


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

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

Name: Morphic-mt.768
Author: mt
Time: 4 March 2015, 6:48:50.402 pm
UUID: 2b59d13e-c425-9946-8b27-8ceef7df20c1
Ancestors: Morphic-mt.767

Fixes rounded corners and respects #gradientWindow preference in UserDialogBoxMorph.

=============== Diff against Morphic-mt.767 ===============

Item was added:
+ ----- Method: UserDialogBoxMorph>>drawSubmorphsOn: (in category 'drawing') -----
+ drawSubmorphsOn: aCanvas
+ 
+ 	super drawSubmorphsOn: aCanvas.
+ 
+ 	self wantsRoundedCorners ifTrue: [
+ 		"Overdraw lower part of title bar to hide bottom corners."
+ 		aCanvas
+ 			fillRectangle: (self submorphs first "titleRow" bottomLeft - (-1 @ Morph preferredCornerRadius)
+ 				corner: self submorphs first "titleRow" bottomRight - (1 at 0))
+ 			color: self color].!

Item was changed:
  ----- Method: UserDialogBoxMorph>>initialize (in category 'initialization') -----
  initialize
+ 
+ 	| titleRow cc |
- 	| titleRow titleFill cc |
  	super initialize.
  	self color: Color white.
  	self listDirection: #topToBottom; wrapCentering: #center;
  		hResizing: #shrinkWrap; vResizing: #shrinkWrap.
+ 	self layoutInset: -1 @ -1; cellInset: 5 at 5.
- 	self layoutInset: 0 at 0; cellInset: 5 at 5.
  	self borderStyle: BorderStyle thinGray.
+ 	self
+ 		useRoundedCorners;
+ 		addDropShadow;
+ 		shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666);
+ 		shadowOffset: 1 @ 1.
- 	self useRoundedCorners;
- 			addDropShadow;
- 			shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666);
- 			shadowOffset: 1 @ 1.
  
  	cc := Color gray: 0.8.
  	titleRow := AlignmentMorph newRow.
  	titleRow hResizing: #spaceFill; vResizing: #shrinkWrap.
+ 	titleRow useRoundedCorners.
+ 	titleRow borderStyle: BorderStyle thinGray.
+ 	titleRow layoutInset: (2 at 5 corner: (2@ (5 + Morph preferredCornerRadius))).
- 	titleRow layoutInset: 2 at 5.
  	titleRow color: cc.
- 	titleFill := GradientFillStyle ramp: {0.0 -> Color white. 1 ->cc}.
- 	titleFill radial: false; origin: titleRow topLeft; direction: 0 @ TextStyle defaultFont height.
- 	titleRow fillStyle: titleFill.
  	titleRow fillStyle: self titleGradient.
  
  	titleMorph := StringMorph new.
  	titleMorph emphasis: 1.
  	titleRow addMorph: titleMorph.
  	labelMorph := TextMorph new.
  	labelMorph margins: 5 at 5.
  	labelMorph lock.
  	buttonRow := AlignmentMorph newRow vResizing: #shrinkWrap.
  	buttonRow hResizing: #shrinkWrap; layoutInset: 5 at 5; cellInset: 5 at 5.
  	buttonRow color: Color transparent.
  	self 
  		addMorphBack: titleRow ;
  		addMorphBack: labelMorph ;
  		addMorphBack: buttonRow ;
  		addDropShadow.
  	keyMap := Dictionary new!

Item was changed:
  ----- Method: UserDialogBoxMorph>>titleGradient (in category 'initialization') -----
  titleGradient
+ 
  	| cc gradient |
+ 	SystemWindow gradientWindow
+ 		ifFalse: [^ SolidFillStyle color: self buttonColor].
+ 
  	cc :=  self buttonColor.
  	gradient := GradientFillStyle ramp: {
  		0.0 -> Color white. 
  		0.33 ->(cc mixed: 0.5 with: Color white). 
  		1.0 -> cc.
  	}.
  	gradient origin: 0 at 0.
  	gradient direction: 0 @ (TextStyle defaultFont height + 10).
  	^gradient!



More information about the Packages mailing list