The Trunk: Morphic-mt.912.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.912.mcz

commits-2
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@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@8 corner: 10@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@5 corner: (2@ (5 + (titleRow cornerStyle == #rounded ifTrue: [Morph preferredCornerRadius] ifFalse: [0])))).
- titleRow layoutInset: (2@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!