[squeak-dev] The Trunk: Morphic-mt.912.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 21 15:05:56 UTC 2015


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

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

Name: Morphic-mt.912
Author: mt
Time: 21 April 2015, 5:05:18.003 pm
UUID: cc482adc-9cba-c74e-9997-ef683fab2ab4
Ancestors: Morphic-mt.911

Let dialogs honor rounded corners preferences.

=============== Diff against Morphic-mt.911 ===============

Item was changed:
  ----- Method: UserDialogBoxMorph>>initialize (in category 'initialization') -----
  initialize
  
  	| titleRow 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 borderStyle: BorderStyle thinGray.
+ 	
+ 	FillInTheBlankMorph roundedDialogCorners
+ 		ifTrue: [self useRoundedCorners].
+ 
+ 	self hasDropShadow: Preferences menuAppearance3d.
- 	self useRoundedCorners.
- 	self hasDropShadow: true.
  	self useSoftDropShadow
  		ifFalse: [
  			self
  				shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666);
  				shadowOffset: 1 @ 1]
  		ifTrue: [
  			self
  				shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01);
  				shadowOffset: (10 at 8 corner: 10 at 12)].
  
  	cc := Color gray: 0.8.
  	titleRow := AlignmentMorph newRow.
  	titleRow hResizing: #spaceFill; vResizing: #shrinkWrap.
+ 
+ 	self cornerStyle == #rounded
+ 		ifTrue: [titleRow useRoundedCorners].
+ 
- 	titleRow useRoundedCorners.
  	titleRow borderStyle: BorderStyle thinGray.
+ 	titleRow layoutInset: (5 at 5 corner: (2@ (5 + (titleRow cornerStyle == #rounded ifTrue: [Morph preferredCornerRadius] ifFalse: [0])))).
- 	titleRow layoutInset: (2 at 5 corner: (2@ (5 + Morph preferredCornerRadius))).
  	titleRow color: cc.
  	titleRow fillStyle: self titleGradient.
  
  	titleMorph := StringMorph new.
  	titleMorph emphasis: 1.
  	titleRow addMorph: titleMorph.
  	labelMorph := TextMorph new.
  	labelMorph margins: (Preferences standardButtonFont widthOf: $x) * 2  @ 0.
  	labelMorph lock.
  	buttonRow := AlignmentMorph newRow
  		vResizing: #rigid;
+ 		height: (Preferences standardButtonFont height + 20);
- 		height: (Preferences standardButtonFont height * 5);
  		hResizing: #spaceFill;
+ 		layoutInset: 
+ 			(((Preferences standardButtonFont widthOf: $x) * 2 @ 0)
+ 			corner: ((Preferences standardButtonFont widthOf: $x) * 2 @ 10));
- 		layoutInset: (Preferences standardButtonFont widthOf: $x) * 2;
  		cellInset: (Preferences standardButtonFont widthOf: $x) * 2.
  	buttonRow color: Color transparent.
  	self 
  		addMorphBack: titleRow ;
  		addMorphBack: labelMorph ;
  		addMorphBack: buttonRow.
  	keyMap := Dictionary new!



More information about the Squeak-dev mailing list