The Trunk: Morphic-mt.1547.mcz

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

The Trunk: Morphic-mt.1547.mcz

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

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

Name: Morphic-mt.1547
Author: mt
Time: 29 September 2019, 7:05:40.322524 pm
UUID: d35fe693-b8fc-574c-a20b-0b5ce37208ad
Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Merge, merge, merge. :-)

Morphic-ct.1505 - halo scale up in demo mode
Morphic-ct.1506 - window icons scale up in demo mode
Morphic-ct.1507 - bugfix open tool attached to mouse
Morphic-ct.1514 - dialog code clean-up
Morphic-ct.1527 - CollapsedMorph
Morphic-ct.1530 - comments
Morphic-ct.1533 - fix in MorphicProject (fillStyle)
Morphic-ct.1535 - fix in MorphicProject (background)
Morphic-ct.1536 - TextMorph constructors

=============== Diff against Morphic-mt.1546 ===============

Item was added:
+ ----- Method: CollapsedMorph class>>createReplacementFor:in: (in category 'instance creation') -----
+ createReplacementFor: aMorph in: anOwner
+
+ ^ self new
+ beReplacementFor: aMorph in: anOwner;
+ yourself!

Item was changed:
  ----- Method: CollapsedMorph>>beReplacementFor: (in category 'collapse/expand') -----
  beReplacementFor: aMorph
+ "Encapsulate aMorph with the CollapsedMorph and display the latter"
 
+ | itsWorld |
- | itsWorld priorPosition |
  (itsWorld := aMorph world) ifNil: [^self].
+ self beReplacementFor: aMorph in: itsWorld.!
- uncollapsedMorph := aMorph.
-
- self setLabel: aMorph externalName.
- aMorph delete.
- itsWorld addMorphFront: self.
- self collapseOrExpand.
- (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
- ifNotNil:
- [self position: priorPosition].
- !

Item was added:
+ ----- Method: CollapsedMorph>>beReplacementFor:in: (in category 'collapse/expand') -----
+ beReplacementFor: aMorph in: anOwner
+ "Encapsulate aMorph with the CollapsedMorph and display the latter in anOwner"
+
+ | priorPosition |
+ uncollapsedMorph := aMorph.
+
+ self setLabel: aMorph externalName.
+ aMorph delete.
+ self privateOwner: anOwner. "lest RealEstateAgent fail at positioning me"
+ self collapseOrExpand.
+ anOwner addMorphFront: self.
+ (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
+ ifNotNil: [self position: priorPosition].!

Item was added:
+ ----- Method: CollapsedMorph>>centerWithWrappees: (in category 'adjusting') -----
+ centerWithWrappees: aPoint
+
+ self center: aPoint.
+ uncollapsedMorph center: aPoint.!

Item was added:
+ ----- Method: CollapsedMorph>>uncollapsedMorph (in category 'accessing') -----
+ uncollapsedMorph
+
+ ^ uncollapsedMorph!

Item was changed:
  ----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
  exploreInvocation
 
+ self exclusive: false.
+ (self findInvocationContext stack collect: #method)
+ explore!
- | result context |
- self exclusive: false. "We want to explore."
-
- result := OrderedCollection new.
- context := self findInvocationContext.
-
- [context sender] whileNotNil: [
- result add: context method.
- context := context sender].
- result add: context method.
-
- result explore.!

Item was changed:
  ----- Method: HaloMorph>>addHandlesForWorldHalos (in category 'private') -----
  addHandlesForWorldHalos
  "Add handles for world halos, like the man said"
 
  | box w |
  w := self world ifNil:[target world].
  self removeAllMorphs.  "remove old handles, if any"
  self bounds: target bounds.
  box := w bounds insetBy: self handleSize // 2.
  target addWorldHandlesTo: self box: box.
 
  Preferences uniqueNamesInHalos ifTrue:
  [innerTarget assureExternalName].
+ self
+ addNameBeneath: ((box insetBy: (0@0 corner: 0@10))
+ scaleBy: RealEstateAgent scaleFactor)
+ string: innerTarget externalName.
- self addNameBeneath: (box insetBy: (0@0 corner: 0@10)) string: innerTarget externalName.
  growingOrRotating := false.
  self layoutChanged.
  self changed.
  !

Item was changed:
  ----- Method: HaloMorph>>basicBox (in category 'private') -----
  basicBox
+ | minSide outset anExtent aBox w |
- | aBox minSide anExtent w |
  minSide := 4 * self handleSize.
+ outset := 8 * RealEstateAgent scaleFactor.
+ anExtent := (self extent + self handleSize + outset) max: minSide asPoint.
- anExtent := ((self width + self handleSize + 8) max: minSide) @
- ((self height + self handleSize + 8) max: minSide).
  aBox := Rectangle center: self center extent: anExtent.
  w := self world ifNil:[target outermostWorldMorph].
  ^ w
  ifNil:
  [aBox]
  ifNotNil:
  [aBox intersect: (w viewBox insetBy: self handleSize // 2)]
  !

Item was changed:
  ----- Method: HaloMorph>>createHandleAt:color:iconName: (in category 'private') -----
  createHandleAt: aPoint color: aColor iconName: iconName
  | bou handle |
  bou := Rectangle center: aPoint extent: self handleSize asPoint.
  Preferences alternateHandlesLook
  ifTrue: [handle := RectangleMorph newBounds: bou color: aColor.
  handle useRoundedCorners.
  self setColor: aColor toHandle: handle]
  ifFalse: [handle := EllipseMorph newBounds: bou color: aColor].
  handle borderWidth: 0;
  wantsYellowButtonMenu: false.
  ""
  iconName isNil
  ifFalse: [| form |
  form := ScriptingSystem formAtKey: iconName.
  form isNil
  ifFalse: [| image |
  image := ImageMorph new.
+ image image: form scaleIconToDisplay.
- image image: form.
  image color: aColor makeForegroundColor.
  image lock.
  handle addMorphCentered: image]].
  ""
  ^ handle!

Item was changed:
  ----- Method: HaloMorph>>handleSize (in category 'private') -----
  handleSize
+ ^ (Preferences biggerHandles
- ^ Preferences biggerHandles
  ifTrue: [30]
+ ifFalse: [16]) * RealEstateAgent scaleFactor!
- ifFalse: [16]!

Item was changed:
  ----- Method: Morph>>hResizing (in category 'layout-properties') -----
  hResizing
  "Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:
  #rigid - do not resize the receiver
  #spaceFill - resize to fill owner's available space
+ #shrinkWrap - resize to fit children
- #shrinkWrap - resize to fit children
  "
  | props |
  props := self layoutProperties.
  ^props ifNil:[#rigid] ifNotNil:[props hResizing].!

Item was changed:
  ----- Method: MorphicProject>>setAsBackground: (in category 'utilities') -----
  setAsBackground: aFormOrColorOrFillStyle
  "Set  aForm as a background image."
 
  | thisWorld newFill oldFill |
+ thisWorld := self world.
- thisWorld := self currentWorld.
 
  oldFill := thisWorld fillStyle.
  thisWorld fillStyle: aFormOrColorOrFillStyle.
  newFill := thisWorld fillStyle.
 
  newFill rememberCommand:
  (Command new cmdWording: 'set background to a picture' translated;
  undoTarget: thisWorld selector: #fillStyle: argument: oldFill;
  redoTarget: thisWorld selector: #fillStyle: argument: newFill).
 
+ thisWorld setProperty: #hasCustomBackground toValue: true.!
- thisWorld setProperty: #hasCustomBackground toValue: true.
- !

Item was changed:
  ----- Method: MorphicProject>>setWorldBackground: (in category 'initialize') -----
  setWorldBackground: force
 
  ((world hasProperty: #hasCustomBackground) and: [force not])
  ifTrue: [^ self].
 
  "If the user has a custom background, propagate it into the new project."
  ((Project current ~~ self and: [Project current isMorphic]) and: [Project current world hasProperty: #hasCustomBackground])
  ifTrue: [
+ world fillStyle: Project current world fillStyle copy.
- world fillStyle: Project current world fillStyle.
  world setProperty: #hasCustomBackground toValue: true]
  ifFalse: [
  world removeProperty: #hasCustomBackground.
  world fillStyle: (self userInterfaceTheme background ifNil: [self class defaultFill])].!

Item was changed:
  ----- Method: PasteUpMorph>>setAsBackground: (in category 'visual properties') -----
  setAsBackground: aFormOrColorOrFillStyle
 
+ | project |
+ (self outermostWorldMorph == self and: [(project := self project) isMorphic])
+ ifTrue: [project setAsBackground: aFormOrColorOrFillStyle]
- (self outermostWorldMorph == self and: [Project current isMorphic])
- ifTrue: [Project current setAsBackground: aFormOrColorOrFillStyle]
  ifFalse: [self fillStyle: aFormOrColorOrFillStyle].!

Item was changed:
  ----- Method: SystemWindow>>createBox: (in category 'initialization') -----
  createBox: aForm
  "create a button with a form to be used in the label area"
 
  | box |
  box := SystemWindowButton new.
  box color: Color transparent;
  target: self;
  useSquareCorners;
  borderWidth: 0;
+ labelGraphic: aForm scaleIconToDisplay;
- labelGraphic: aForm;
  extent: self boxExtent.
  ^ box!

Item was changed:
  ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') -----
  justDroppedInto: aMorph event: anEvent
 
  isCollapsed
  ifTrue: [self position: ((self position max: 0@0) grid: 8@8).
  collapsedFrame := self bounds]
  ifFalse: [fullFrame := self bounds].
 
  self beKeyWindow.
  self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:."
 
  aMorph == self world ifTrue: [self assureLabelAreaVisible].
 
  (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop))
  ifTrue: [
  self removeProperty: #initialDrop.
  (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: [])
  ifNotNil: [:grip |
  grip
  referencePoint: anEvent position;
  setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:".
+ self
+ hasDropShadow: false;
+ lookFocused.
+ anEvent hand newMouseFocus: grip.]].
- self hasDropShadow: false.
- anEvent hand newMouseFocus: grip]].
 
  ^super justDroppedInto: aMorph event: anEvent!

Item was added:
+ ----- Method: TextMorph class>>string:fontName: (in category 'instance creation') -----
+ string: aString fontName: aName
+
+ ^ self
+ string: aString
+ fontName: aName
+ size: TextStyle defaultFont pixelSize!

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize
+
+ ^ self
+ string: aString
+ fontName: aName
+ size: aSize
+ wrap: false "...because we don't know the initial width to wrap..."
+ !

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size:wrap: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize wrap: shouldWrap
+
+ ^ self new
+ string: aString fontName: aName size: aSize wrap: shouldWrap;
+ yourself!

Item was added:
+ ----- Method: TextMorph class>>string:size: (in category 'instance creation') -----
+ string: aString size: pixelSize
+
+ ^ self
+ string: aString
+ fontName: TextStyle defaultFont familyName
+ size: pixelSize!

Item was changed:
+ ----- Method: TextMorph>>fontName:pointSize: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:pointSize: (in category 'accessing') -----
  fontName: fontName pointSize: fontSize
  | newTextStyle |
  newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
  newTextStyle ifNil: [self error: 'font ', fontName, ' not found.'].
 
  textStyle := newTextStyle.
  text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfPointSize: fontSize)).
+ self releaseParagraph.!
- paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
+ ----- Method: TextMorph>>fontName:size: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:size: (in category 'accessing') -----
  fontName: fontName size: fontSize
  | newTextStyle |
  newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
  textStyle := newTextStyle.
  text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfSize: fontSize)).
+ self releaseParagraph.!
- paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
  ----- Method: TextMorph>>string:fontName:size:wrap: (in category 'initialization') -----
  string: aString fontName: aName size: aSize wrap: shouldWrap
 
  shouldWrap
  ifTrue: [self contentsWrapped: aString]
+ ifFalse: [self contentsAsIs: aString].
+
- ifFalse: [self contents: aString].
  self fontName: aName size: aSize!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1547.mcz

Tobias Pape
No octopus has that many arms...

> On 29.09.2019, at 19:05, [hidden email] wrote:
>
> Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-mt.1547.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-mt.1547
> Author: mt
> Time: 29 September 2019, 7:05:40.322524 pm
> UUID: d35fe693-b8fc-574c-a20b-0b5ce37208ad
> Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536
>
> Merge, merge, merge. :-)
>
> Morphic-ct.1505 - halo scale up in demo mode
> Morphic-ct.1506 - window icons scale up in demo mode
> Morphic-ct.1507 - bugfix open tool attached to mouse
> Morphic-ct.1514 - dialog code clean-up
> Morphic-ct.1527 - CollapsedMorph
> Morphic-ct.1530 - comments
> Morphic-ct.1533 - fix in MorphicProject (fillStyle)
> Morphic-ct.1535 - fix in MorphicProject (background)
> Morphic-ct.1536 - TextMorph constructors
>
> =============== Diff against Morphic-mt.1546 ===============
>
> Item was added:
> + ----- Method: CollapsedMorph class>>createReplacementFor:in: (in category 'instance creation') -----
> + createReplacementFor: aMorph in: anOwner
> +
> + ^ self new
> + beReplacementFor: aMorph in: anOwner;
> + yourself!
>
> Item was changed:
>  ----- Method: CollapsedMorph>>beReplacementFor: (in category 'collapse/expand') -----
>  beReplacementFor: aMorph
> + "Encapsulate aMorph with the CollapsedMorph and display the latter"
>
> + | itsWorld |
> - | itsWorld priorPosition |
>   (itsWorld := aMorph world) ifNil: [^self].
> + self beReplacementFor: aMorph in: itsWorld.!
> - uncollapsedMorph := aMorph.
> -
> - self setLabel: aMorph externalName.
> - aMorph delete.
> - itsWorld addMorphFront: self.
> - self collapseOrExpand.
> - (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
> - ifNotNil:
> - [self position: priorPosition].
> - !
>
> Item was added:
> + ----- Method: CollapsedMorph>>beReplacementFor:in: (in category 'collapse/expand') -----
> + beReplacementFor: aMorph in: anOwner
> + "Encapsulate aMorph with the CollapsedMorph and display the latter in anOwner"
> +
> + | priorPosition |
> + uncollapsedMorph := aMorph.
> +
> + self setLabel: aMorph externalName.
> + aMorph delete.
> + self privateOwner: anOwner. "lest RealEstateAgent fail at positioning me"
> + self collapseOrExpand.
> + anOwner addMorphFront: self.
> + (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
> + ifNotNil: [self position: priorPosition].!
>
> Item was added:
> + ----- Method: CollapsedMorph>>centerWithWrappees: (in category 'adjusting') -----
> + centerWithWrappees: aPoint
> +
> + self center: aPoint.
> + uncollapsedMorph center: aPoint.!
>
> Item was added:
> + ----- Method: CollapsedMorph>>uncollapsedMorph (in category 'accessing') -----
> + uncollapsedMorph
> +
> + ^ uncollapsedMorph!
>
> Item was changed:
>  ----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
>  exploreInvocation
>
> + self exclusive: false.
> + (self findInvocationContext stack collect: #method)
> + explore!
> - | result context |
> - self exclusive: false. "We want to explore."
> -
> - result := OrderedCollection new.
> - context := self findInvocationContext.
> -
> - [context sender] whileNotNil: [
> - result add: context method.
> - context := context sender].
> - result add: context method.
> -
> - result explore.!
>
> Item was changed:
>  ----- Method: HaloMorph>>addHandlesForWorldHalos (in category 'private') -----
>  addHandlesForWorldHalos
>   "Add handles for world halos, like the man said"
>
>   | box w |
>   w := self world ifNil:[target world].
>   self removeAllMorphs.  "remove old handles, if any"
>   self bounds: target bounds.
>   box := w bounds insetBy: self handleSize // 2.
>   target addWorldHandlesTo: self box: box.
>
>   Preferences uniqueNamesInHalos ifTrue:
>   [innerTarget assureExternalName].
> + self
> + addNameBeneath: ((box insetBy: (0@0 corner: 0@10))
> + scaleBy: RealEstateAgent scaleFactor)
> + string: innerTarget externalName.
> - self addNameBeneath: (box insetBy: (0@0 corner: 0@10)) string: innerTarget externalName.
>   growingOrRotating := false.
>   self layoutChanged.
>   self changed.
>  !
>
> Item was changed:
>  ----- Method: HaloMorph>>basicBox (in category 'private') -----
>  basicBox
> + | minSide outset anExtent aBox w |
> - | aBox minSide anExtent w |
>   minSide := 4 * self handleSize.
> + outset := 8 * RealEstateAgent scaleFactor.
> + anExtent := (self extent + self handleSize + outset) max: minSide asPoint.
> - anExtent := ((self width + self handleSize + 8) max: minSide) @
> - ((self height + self handleSize + 8) max: minSide).
>   aBox := Rectangle center: self center extent: anExtent.
>   w := self world ifNil:[target outermostWorldMorph].
>   ^ w
>   ifNil:
>   [aBox]
>   ifNotNil:
>   [aBox intersect: (w viewBox insetBy: self handleSize // 2)]
>  !
>
> Item was changed:
>  ----- Method: HaloMorph>>createHandleAt:color:iconName: (in category 'private') -----
>  createHandleAt: aPoint color: aColor iconName: iconName
>   | bou handle |
>   bou := Rectangle center: aPoint extent: self handleSize asPoint.
>   Preferences alternateHandlesLook
>   ifTrue: [handle := RectangleMorph newBounds: bou color: aColor.
>   handle useRoundedCorners.
>   self setColor: aColor toHandle: handle]
>   ifFalse: [handle := EllipseMorph newBounds: bou color: aColor].
>   handle borderWidth: 0;
>   wantsYellowButtonMenu: false.
>   ""
>   iconName isNil
>   ifFalse: [| form |
>   form := ScriptingSystem formAtKey: iconName.
>   form isNil
>   ifFalse: [| image |
>   image := ImageMorph new.
> + image image: form scaleIconToDisplay.
> - image image: form.
>   image color: aColor makeForegroundColor.
>   image lock.
>   handle addMorphCentered: image]].
>   ""
>   ^ handle!
>
> Item was changed:
>  ----- Method: HaloMorph>>handleSize (in category 'private') -----
>  handleSize
> + ^ (Preferences biggerHandles
> - ^ Preferences biggerHandles
>   ifTrue: [30]
> + ifFalse: [16]) * RealEstateAgent scaleFactor!
> - ifFalse: [16]!
>
> Item was changed:
>  ----- Method: Morph>>hResizing (in category 'layout-properties') -----
>  hResizing
>   "Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:
>   #rigid - do not resize the receiver
>   #spaceFill - resize to fill owner's available space
> + #shrinkWrap - resize to fit children
> - #shrinkWrap - resize to fit children
>   "
>   | props |
>   props := self layoutProperties.
>   ^props ifNil:[#rigid] ifNotNil:[props hResizing].!
>
> Item was changed:
>  ----- Method: MorphicProject>>setAsBackground: (in category 'utilities') -----
>  setAsBackground: aFormOrColorOrFillStyle
>   "Set  aForm as a background image."
>
>   | thisWorld newFill oldFill |
> + thisWorld := self world.
> - thisWorld := self currentWorld.
>  
>   oldFill := thisWorld fillStyle.
>   thisWorld fillStyle: aFormOrColorOrFillStyle.
>   newFill := thisWorld fillStyle.
>  
>   newFill rememberCommand:
>   (Command new cmdWording: 'set background to a picture' translated;
>   undoTarget: thisWorld selector: #fillStyle: argument: oldFill;
>   redoTarget: thisWorld selector: #fillStyle: argument: newFill).
>  
> + thisWorld setProperty: #hasCustomBackground toValue: true.!
> - thisWorld setProperty: #hasCustomBackground toValue: true.
> - !
>
> Item was changed:
>  ----- Method: MorphicProject>>setWorldBackground: (in category 'initialize') -----
>  setWorldBackground: force
>
>   ((world hasProperty: #hasCustomBackground) and: [force not])
>   ifTrue: [^ self].
>
>   "If the user has a custom background, propagate it into the new project."
>   ((Project current ~~ self and: [Project current isMorphic]) and: [Project current world hasProperty: #hasCustomBackground])
>   ifTrue: [
> + world fillStyle: Project current world fillStyle copy.
> - world fillStyle: Project current world fillStyle.
>   world setProperty: #hasCustomBackground toValue: true]
>   ifFalse: [
>   world removeProperty: #hasCustomBackground.
>   world fillStyle: (self userInterfaceTheme background ifNil: [self class defaultFill])].!
>
> Item was changed:
>  ----- Method: PasteUpMorph>>setAsBackground: (in category 'visual properties') -----
>  setAsBackground: aFormOrColorOrFillStyle
>
> + | project |
> + (self outermostWorldMorph == self and: [(project := self project) isMorphic])
> + ifTrue: [project setAsBackground: aFormOrColorOrFillStyle]
> - (self outermostWorldMorph == self and: [Project current isMorphic])
> - ifTrue: [Project current setAsBackground: aFormOrColorOrFillStyle]
>   ifFalse: [self fillStyle: aFormOrColorOrFillStyle].!
>
> Item was changed:
>  ----- Method: SystemWindow>>createBox: (in category 'initialization') -----
>  createBox: aForm
>   "create a button with a form to be used in the label area"
>  
>   | box |
>   box := SystemWindowButton new.
>   box color: Color transparent;
>   target: self;
>   useSquareCorners;
>   borderWidth: 0;
> + labelGraphic: aForm scaleIconToDisplay;
> - labelGraphic: aForm;
>   extent: self boxExtent.
>   ^ box!
>
> Item was changed:
>  ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') -----
>  justDroppedInto: aMorph event: anEvent
>
>   isCollapsed
>   ifTrue: [self position: ((self position max: 0@0) grid: 8@8).
>   collapsedFrame := self bounds]
>   ifFalse: [fullFrame := self bounds].
>
>   self beKeyWindow.
>   self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:."
>  
>   aMorph == self world ifTrue: [self assureLabelAreaVisible].
>
>   (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop))
>   ifTrue: [
>   self removeProperty: #initialDrop.
>   (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: [])
>   ifNotNil: [:grip |
>   grip
>   referencePoint: anEvent position;
>   setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:".
> + self
> + hasDropShadow: false;
> + lookFocused.
> + anEvent hand newMouseFocus: grip.]].
> - self hasDropShadow: false.
> - anEvent hand newMouseFocus: grip]].
>  
>   ^super justDroppedInto: aMorph event: anEvent!
>
> Item was added:
> + ----- Method: TextMorph class>>string:fontName: (in category 'instance creation') -----
> + string: aString fontName: aName
> +
> + ^ self
> + string: aString
> + fontName: aName
> + size: TextStyle defaultFont pixelSize!
>
> Item was added:
> + ----- Method: TextMorph class>>string:fontName:size: (in category 'instance creation') -----
> + string: aString fontName: aName size: aSize
> +
> + ^ self
> + string: aString
> + fontName: aName
> + size: aSize
> + wrap: false "...because we don't know the initial width to wrap..."
> + !
>
> Item was added:
> + ----- Method: TextMorph class>>string:fontName:size:wrap: (in category 'instance creation') -----
> + string: aString fontName: aName size: aSize wrap: shouldWrap
> +
> + ^ self new
> + string: aString fontName: aName size: aSize wrap: shouldWrap;
> + yourself!
>
> Item was added:
> + ----- Method: TextMorph class>>string:size: (in category 'instance creation') -----
> + string: aString size: pixelSize
> +
> + ^ self
> + string: aString
> + fontName: TextStyle defaultFont familyName
> + size: pixelSize!
>
> Item was changed:
> + ----- Method: TextMorph>>fontName:pointSize: (in category 'initialization') -----
> - ----- Method: TextMorph>>fontName:pointSize: (in category 'accessing') -----
>  fontName: fontName pointSize: fontSize
>   | newTextStyle |
>   newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
>   newTextStyle ifNil: [self error: 'font ', fontName, ' not found.'].
>
>   textStyle := newTextStyle.
>   text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfPointSize: fontSize)).
> + self releaseParagraph.!
> - paragraph ifNotNil: [paragraph textStyle: newTextStyle]!
>
> Item was changed:
> + ----- Method: TextMorph>>fontName:size: (in category 'initialization') -----
> - ----- Method: TextMorph>>fontName:size: (in category 'accessing') -----
>  fontName: fontName size: fontSize
>   | newTextStyle |
>   newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
>   textStyle := newTextStyle.
>   text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfSize: fontSize)).
> + self releaseParagraph.!
> - paragraph ifNotNil: [paragraph textStyle: newTextStyle]!
>
> Item was changed:
>  ----- Method: TextMorph>>string:fontName:size:wrap: (in category 'initialization') -----
>  string: aString fontName: aName size: aSize wrap: shouldWrap
>
>   shouldWrap
>   ifTrue: [self contentsWrapped: aString]
> + ifFalse: [self contentsAsIs: aString].
> +
> - ifFalse: [self contents: aString].
>   self fontName: aName size: aSize!
>
>



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1547.mcz

Christoph Thiede
In reply to this post by commits-2

Wow, thank you for your effort :-)


Did I handle the ancestry wrong again or is this excessive merging actually the usual workflow?


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Sonntag, 29. September 2019 19:05:47
An: [hidden email]; [hidden email]
Betreff: [squeak-dev] The Trunk: Morphic-mt.1547.mcz
 
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1547.mcz

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

Name: Morphic-mt.1547
Author: mt
Time: 29 September 2019, 7:05:40.322524 pm
UUID: d35fe693-b8fc-574c-a20b-0b5ce37208ad
Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Merge, merge, merge. :-)

Morphic-ct.1505 - halo scale up in demo mode
Morphic-ct.1506 - window icons scale up in demo mode
Morphic-ct.1507 - bugfix open tool attached to mouse
Morphic-ct.1514 - dialog code clean-up
Morphic-ct.1527 - CollapsedMorph
Morphic-ct.1530 - comments
Morphic-ct.1533 - fix in MorphicProject (fillStyle)
Morphic-ct.1535 - fix in MorphicProject (background)
Morphic-ct.1536 - TextMorph constructors

=============== Diff against Morphic-mt.1546 ===============

Item was added:
+ ----- Method: CollapsedMorph class>>createReplacementFor:in: (in category 'instance creation') -----
+ createReplacementFor: aMorph in: anOwner
+
+        ^ self new
+                beReplacementFor: aMorph in: anOwner;
+                yourself!

Item was changed:
  ----- Method: CollapsedMorph>>beReplacementFor: (in category 'collapse/expand') -----
  beReplacementFor: aMorph
+        "Encapsulate aMorph with the CollapsedMorph and display the latter"
 
+        | itsWorld |
-        | itsWorld priorPosition |
         (itsWorld := aMorph world) ifNil: [^self].
+        self beReplacementFor: aMorph in: itsWorld.!
-        uncollapsedMorph := aMorph.
-                       
-        self setLabel: aMorph externalName.
-        aMorph delete.
-        itsWorld addMorphFront: self.
-        self collapseOrExpand.
-        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
-        ifNotNil:
-                [self position: priorPosition].
- !

Item was added:
+ ----- Method: CollapsedMorph>>beReplacementFor:in: (in category 'collapse/expand') -----
+ beReplacementFor: aMorph in: anOwner
+        "Encapsulate aMorph with the CollapsedMorph and display the latter in anOwner"
+
+        | priorPosition |
+        uncollapsedMorph := aMorph.
+       
+        self setLabel: aMorph externalName.
+        aMorph delete.
+        self privateOwner: anOwner. "lest RealEstateAgent fail at positioning me"
+        self collapseOrExpand.
+        anOwner addMorphFront: self.
+        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
+                ifNotNil: [self position: priorPosition].!

Item was added:
+ ----- Method: CollapsedMorph>>centerWithWrappees: (in category 'adjusting') -----
+ centerWithWrappees: aPoint
+
+        self center: aPoint.
+        uncollapsedMorph center: aPoint.!

Item was added:
+ ----- Method: CollapsedMorph>>uncollapsedMorph (in category 'accessing') -----
+ uncollapsedMorph
+
+        ^ uncollapsedMorph!

Item was changed:
  ----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
  exploreInvocation
 
+        self exclusive: false.
+        (self findInvocationContext stack collect: #method)
+                explore!
-        | result context |
-        self exclusive: false. "We want to explore."
-
-        result := OrderedCollection new.
-        context := self findInvocationContext.
-       
-        [context sender] whileNotNil: [
-                result add: context method.
-                context := context sender].
-        result add: context method.
-
-        result explore.!

Item was changed:
  ----- Method: HaloMorph>>addHandlesForWorldHalos (in category 'private') -----
  addHandlesForWorldHalos
         "Add handles for world halos, like the man said"
 
         | box w |
         w := self world ifNil:[target world].
         self removeAllMorphs.  "remove old handles, if any"
         self bounds: target bounds.
         box := w bounds insetBy: self handleSize // 2.
         target addWorldHandlesTo: self box: box.
 
         Preferences uniqueNamesInHalos ifTrue:
                 [innerTarget assureExternalName].
+        self
+                addNameBeneath: ((box insetBy: (0@0 corner: 0@10))
+                        scaleBy: RealEstateAgent scaleFactor)
+                string: innerTarget externalName.
-        self addNameBeneath: (box insetBy: (0@0 corner: 0@10)) string: innerTarget externalName.
         growingOrRotating := false.
         self layoutChanged.
         self changed.
  !

Item was changed:
  ----- Method: HaloMorph>>basicBox (in category 'private') -----
  basicBox
+        | minSide outset anExtent aBox w |
-        | aBox minSide anExtent w |
         minSide := 4 * self handleSize.
+        outset := 8 * RealEstateAgent scaleFactor.
+        anExtent := (self extent + self handleSize + outset) max: minSide asPoint.
-        anExtent := ((self width + self handleSize + 8) max: minSide) @
-                                ((self height + self handleSize + 8) max: minSide).
         aBox := Rectangle center: self center extent: anExtent.
         w := self world ifNil:[target outermostWorldMorph].
         ^ w
                 ifNil:
                         [aBox]
                 ifNotNil:
                         [aBox intersect: (w viewBox insetBy: self handleSize // 2)]
  !

Item was changed:
  ----- Method: HaloMorph>>createHandleAt:color:iconName: (in category 'private') -----
  createHandleAt: aPoint color: aColor iconName: iconName
         | bou handle |
         bou := Rectangle center: aPoint extent: self handleSize asPoint.
         Preferences alternateHandlesLook
                 ifTrue: [handle := RectangleMorph newBounds: bou color: aColor.
                         handle useRoundedCorners.
                         self setColor: aColor toHandle: handle]
                 ifFalse: [handle := EllipseMorph newBounds: bou color: aColor].
         handle borderWidth: 0;
                  wantsYellowButtonMenu: false.
         ""
         iconName isNil
                 ifFalse: [| form |
                         form := ScriptingSystem formAtKey: iconName.
                         form isNil
                                 ifFalse: [| image |
                                         image := ImageMorph new.
+                                        image image: form scaleIconToDisplay.
-                                        image image: form.
                                         image color: aColor makeForegroundColor.
                                         image lock.
                                         handle addMorphCentered: image]].
         ""
         ^ handle!

Item was changed:
  ----- Method: HaloMorph>>handleSize (in category 'private') -----
  handleSize
+        ^ (Preferences biggerHandles
-        ^ Preferences biggerHandles
                 ifTrue: [30]
+                ifFalse: [16]) * RealEstateAgent scaleFactor!
-                ifFalse: [16]!

Item was changed:
  ----- Method: Morph>>hResizing (in category 'layout-properties') -----
  hResizing
         "Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:
                 #rigid                  -       do not resize the receiver
                 #spaceFill              -       resize to fill owner's available space
+                #shrinkWrap     -       resize to fit children
-                #shrinkWrap     - resize to fit children
         "
         | props |
         props := self layoutProperties.
         ^props ifNil:[#rigid] ifNotNil:[props hResizing].!

Item was changed:
  ----- Method: MorphicProject>>setAsBackground: (in category 'utilities') -----
  setAsBackground: aFormOrColorOrFillStyle
         "Set  aForm as a background image."
 
         | thisWorld newFill oldFill |
+        thisWorld := self world.
-        thisWorld := self currentWorld.
        
         oldFill := thisWorld fillStyle.
         thisWorld fillStyle: aFormOrColorOrFillStyle.
         newFill := thisWorld fillStyle.
        
         newFill rememberCommand:
                 (Command new cmdWording: 'set background to a picture' translated;
                         undoTarget: thisWorld selector: #fillStyle: argument: oldFill;
                         redoTarget: thisWorld selector: #fillStyle: argument: newFill).
        
+        thisWorld setProperty: #hasCustomBackground toValue: true.!
-        thisWorld setProperty: #hasCustomBackground toValue: true.
- !

Item was changed:
  ----- Method: MorphicProject>>setWorldBackground: (in category 'initialize') -----
  setWorldBackground: force
 
         ((world hasProperty: #hasCustomBackground) and: [force not])
                 ifTrue: [^ self].
 
         "If the user has a custom background, propagate it into the new project."
         ((Project current ~~ self and: [Project current isMorphic]) and: [Project current world hasProperty: #hasCustomBackground])
                 ifTrue: [
+                        world fillStyle: Project current world fillStyle copy.
-                        world fillStyle: Project current world fillStyle.
                         world setProperty: #hasCustomBackground toValue: true]
                 ifFalse: [
                         world removeProperty: #hasCustomBackground.
                         world fillStyle: (self userInterfaceTheme background ifNil: [self class defaultFill])].!

Item was changed:
  ----- Method: PasteUpMorph>>setAsBackground: (in category 'visual properties') -----
  setAsBackground: aFormOrColorOrFillStyle
 
+        | project |
+        (self outermostWorldMorph == self and: [(project := self project) isMorphic])
+                ifTrue: [project setAsBackground: aFormOrColorOrFillStyle]
-        (self outermostWorldMorph == self and: [Project current isMorphic])
-                ifTrue: [Project current setAsBackground: aFormOrColorOrFillStyle]
                 ifFalse: [self fillStyle: aFormOrColorOrFillStyle].!

Item was changed:
  ----- Method: SystemWindow>>createBox: (in category 'initialization') -----
  createBox: aForm
         "create a button with a form to be used in the label area"
        
         | box |
         box := SystemWindowButton new.
         box color: Color transparent;
                  target: self;
                  useSquareCorners;
                  borderWidth: 0;
+                 labelGraphic: aForm scaleIconToDisplay;
-                 labelGraphic: aForm;
                  extent: self boxExtent.
         ^ box!

Item was changed:
  ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') -----
  justDroppedInto: aMorph event: anEvent
 
         isCollapsed
                 ifTrue: [self position: ((self position max: 0@0) grid: 8@8).
                                 collapsedFrame := self bounds]
                 ifFalse: [fullFrame := self bounds].
 
         self beKeyWindow.
         self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:."
                        
         aMorph == self world ifTrue: [self assureLabelAreaVisible].
 
         (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop))
                 ifTrue: [
                         self removeProperty: #initialDrop.
                         (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: [])
                                 ifNotNil: [:grip |
                                         grip
                                                 referencePoint: anEvent position;
                                                 setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:".
+                                        self
+                                                hasDropShadow: false;
+                                                lookFocused.
+                                        anEvent hand newMouseFocus: grip.]].
-                                        self hasDropShadow: false.
-                                        anEvent hand newMouseFocus: grip]].
                        
         ^super justDroppedInto: aMorph event: anEvent!

Item was added:
+ ----- Method: TextMorph class>>string:fontName: (in category 'instance creation') -----
+ string: aString fontName: aName
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: TextStyle defaultFont pixelSize!

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: aSize
+                wrap: false "...because we don't know the initial width to wrap..."
+ !

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size:wrap: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize wrap: shouldWrap
+
+        ^ self new
+                string: aString fontName: aName size: aSize wrap: shouldWrap;
+                yourself!

Item was added:
+ ----- Method: TextMorph class>>string:size: (in category 'instance creation') -----
+ string: aString size: pixelSize
+
+        ^ self
+                string: aString
+                fontName: TextStyle defaultFont familyName
+                size: pixelSize!

Item was changed:
+ ----- Method: TextMorph>>fontName:pointSize: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:pointSize: (in category 'accessing') -----
  fontName: fontName pointSize: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         newTextStyle ifNil: [self error: 'font ', fontName, ' not found.'].
 
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfPointSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
+ ----- Method: TextMorph>>fontName:size: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:size: (in category 'accessing') -----
  fontName: fontName size: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
  ----- Method: TextMorph>>string:fontName:size:wrap: (in category 'initialization') -----
  string: aString fontName: aName size: aSize wrap: shouldWrap
 
         shouldWrap
                 ifTrue: [self contentsWrapped: aString]
+                ifFalse: [self contentsAsIs: aString].
+
-                ifFalse: [self contents: aString].
         self fontName: aName size: aSize!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1547.mcz

marcel.taeumel
The ancestry was fine or else you wouldn't see that:

Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Those commits did not depend on each other, so I could review them side-by-side and push them all at once to avoid noise on the mailing list. Also, I could copy all your versions to the Trunk.

Best,
Marcel

Am 30.09.2019 11:41:00 schrieb Thiede, Christoph <[hidden email]>:

Wow, thank you for your effort :-)


Did I handle the ancestry wrong again or is this excessive merging actually the usual workflow?


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Sonntag, 29. September 2019 19:05:47
An: [hidden email]; [hidden email]
Betreff: [squeak-dev] The Trunk: Morphic-mt.1547.mcz
 
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1547.mcz

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

Name: Morphic-mt.1547
Author: mt
Time: 29 September 2019, 7:05:40.322524 pm
UUID: d35fe693-b8fc-574c-a20b-0b5ce37208ad
Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Merge, merge, merge. :-)

Morphic-ct.1505 - halo scale up in demo mode
Morphic-ct.1506 - window icons scale up in demo mode
Morphic-ct.1507 - bugfix open tool attached to mouse
Morphic-ct.1514 - dialog code clean-up
Morphic-ct.1527 - CollapsedMorph
Morphic-ct.1530 - comments
Morphic-ct.1533 - fix in MorphicProject (fillStyle)
Morphic-ct.1535 - fix in MorphicProject (background)
Morphic-ct.1536 - TextMorph constructors

=============== Diff against Morphic-mt.1546 ===============

Item was added:
+ ----- Method: CollapsedMorph class>>createReplacementFor:in: (in category 'instance creation') -----
+ createReplacementFor: aMorph in: anOwner
+
+        ^ self new
+                beReplacementFor: aMorph in: anOwner;
+                yourself!

Item was changed:
  ----- Method: CollapsedMorph>>beReplacementFor: (in category 'collapse/expand') -----
  beReplacementFor: aMorph
+        "Encapsulate aMorph with the CollapsedMorph and display the latter"
 
+        | itsWorld |
-        | itsWorld priorPosition |
         (itsWorld := aMorph world) ifNil: [^self].
+        self beReplacementFor: aMorph in: itsWorld.!
-        uncollapsedMorph := aMorph.
-                       
-        self setLabel: aMorph externalName.
-        aMorph delete.
-        itsWorld addMorphFront: self.
-        self collapseOrExpand.
-        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
-        ifNotNil:
-                [self position: priorPosition].
- !

Item was added:
+ ----- Method: CollapsedMorph>>beReplacementFor:in: (in category 'collapse/expand') -----
+ beReplacementFor: aMorph in: anOwner
+        "Encapsulate aMorph with the CollapsedMorph and display the latter in anOwner"
+
+        | priorPosition |
+        uncollapsedMorph := aMorph.
+       
+        self setLabel: aMorph externalName.
+        aMorph delete.
+        self privateOwner: anOwner. "lest RealEstateAgent fail at positioning me"
+        self collapseOrExpand.
+        anOwner addMorphFront: self.
+        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
+                ifNotNil: [self position: priorPosition].!

Item was added:
+ ----- Method: CollapsedMorph>>centerWithWrappees: (in category 'adjusting') -----
+ centerWithWrappees: aPoint
+
+        self center: aPoint.
+        uncollapsedMorph center: aPoint.!

Item was added:
+ ----- Method: CollapsedMorph>>uncollapsedMorph (in category 'accessing') -----
+ uncollapsedMorph
+
+        ^ uncollapsedMorph!

Item was changed:
  ----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
  exploreInvocation
 
+        self exclusive: false.
+        (self findInvocationContext stack collect: #method)
+                explore!
-        | result context |
-        self exclusive: false. "We want to explore."
-
-        result := OrderedCollection new.
-        context := self findInvocationContext.
-       
-        [context sender] whileNotNil: [
-                result add: context method.
-                context := context sender].
-        result add: context method.
-
-        result explore.!

Item was changed:
  ----- Method: HaloMorph>>addHandlesForWorldHalos (in category 'private') -----
  addHandlesForWorldHalos
         "Add handles for world halos, like the man said"
 
         | box w |
         w := self world ifNil:[target world].
         self removeAllMorphs.  "remove old handles, if any"
         self bounds: target bounds.
         box := w bounds insetBy: self handleSize // 2.
         target addWorldHandlesTo: self box: box.
 
         Preferences uniqueNamesInHalos ifTrue:
                 [innerTarget assureExternalName].
+        self
+                addNameBeneath: ((box insetBy: (0@0 corner: 0@10))
+                        scaleBy: RealEstateAgent scaleFactor)
+                string: innerTarget externalName.
-        self addNameBeneath: (box insetBy: (0@0 corner: 0@10)) string: innerTarget externalName.
         growingOrRotating := false.
         self layoutChanged.
         self changed.
  !

Item was changed:
  ----- Method: HaloMorph>>basicBox (in category 'private') -----
  basicBox
+        | minSide outset anExtent aBox w |
-        | aBox minSide anExtent w |
         minSide := 4 * self handleSize.
+        outset := 8 * RealEstateAgent scaleFactor.
+        anExtent := (self extent + self handleSize + outset) max: minSide asPoint.
-        anExtent := ((self width + self handleSize + 8) max: minSide) @
-                                ((self height + self handleSize + 8) max: minSide).
         aBox := Rectangle center: self center extent: anExtent.
         w := self world ifNil:[target outermostWorldMorph].
         ^ w
                 ifNil:
                         [aBox]
                 ifNotNil:
                         [aBox intersect: (w viewBox insetBy: self handleSize // 2)]
  !

Item was changed:
  ----- Method: HaloMorph>>createHandleAt:color:iconName: (in category 'private') -----
  createHandleAt: aPoint color: aColor iconName: iconName
         | bou handle |
         bou := Rectangle center: aPoint extent: self handleSize asPoint.
         Preferences alternateHandlesLook
                 ifTrue: [handle := RectangleMorph newBounds: bou color: aColor.
                         handle useRoundedCorners.
                         self setColor: aColor toHandle: handle]
                 ifFalse: [handle := EllipseMorph newBounds: bou color: aColor].
         handle borderWidth: 0;
                  wantsYellowButtonMenu: false.
         ""
         iconName isNil
                 ifFalse: [| form |
                         form := ScriptingSystem formAtKey: iconName.
                         form isNil
                                 ifFalse: [| image |
                                         image := ImageMorph new.
+                                        image image: form scaleIconToDisplay.
-                                        image image: form.
                                         image color: aColor makeForegroundColor.
                                         image lock.
                                         handle addMorphCentered: image]].
         ""
         ^ handle!

Item was changed:
  ----- Method: HaloMorph>>handleSize (in category 'private') -----
  handleSize
+        ^ (Preferences biggerHandles
-        ^ Preferences biggerHandles
                 ifTrue: [30]
+                ifFalse: [16]) * RealEstateAgent scaleFactor!
-                ifFalse: [16]!

Item was changed:
  ----- Method: Morph>>hResizing (in category 'layout-properties') -----
  hResizing
         "Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:
                 #rigid                  -       do not resize the receiver
                 #spaceFill              -       resize to fill owner's available space
+                #shrinkWrap     -       resize to fit children
-                #shrinkWrap     - resize to fit children
         "
         | props |
         props := self layoutProperties.
         ^props ifNil:[#rigid] ifNotNil:[props hResizing].!

Item was changed:
  ----- Method: MorphicProject>>setAsBackground: (in category 'utilities') -----
  setAsBackground: aFormOrColorOrFillStyle
         "Set  aForm as a background image."
 
         | thisWorld newFill oldFill |
+        thisWorld := self world.
-        thisWorld := self currentWorld.
        
         oldFill := thisWorld fillStyle.
         thisWorld fillStyle: aFormOrColorOrFillStyle.
         newFill := thisWorld fillStyle.
        
         newFill rememberCommand:
                 (Command new cmdWording: 'set background to a picture' translated;
                         undoTarget: thisWorld selector: #fillStyle: argument: oldFill;
                         redoTarget: thisWorld selector: #fillStyle: argument: newFill).
        
+        thisWorld setProperty: #hasCustomBackground toValue: true.!
-        thisWorld setProperty: #hasCustomBackground toValue: true.
- !

Item was changed:
  ----- Method: MorphicProject>>setWorldBackground: (in category 'initialize') -----
  setWorldBackground: force
 
         ((world hasProperty: #hasCustomBackground) and: [force not])
                 ifTrue: [^ self].
 
         "If the user has a custom background, propagate it into the new project."
         ((Project current ~~ self and: [Project current isMorphic]) and: [Project current world hasProperty: #hasCustomBackground])
                 ifTrue: [
+                        world fillStyle: Project current world fillStyle copy.
-                        world fillStyle: Project current world fillStyle.
                         world setProperty: #hasCustomBackground toValue: true]
                 ifFalse: [
                         world removeProperty: #hasCustomBackground.
                         world fillStyle: (self userInterfaceTheme background ifNil: [self class defaultFill])].!

Item was changed:
  ----- Method: PasteUpMorph>>setAsBackground: (in category 'visual properties') -----
  setAsBackground: aFormOrColorOrFillStyle
 
+        | project |
+        (self outermostWorldMorph == self and: [(project := self project) isMorphic])
+                ifTrue: [project setAsBackground: aFormOrColorOrFillStyle]
-        (self outermostWorldMorph == self and: [Project current isMorphic])
-                ifTrue: [Project current setAsBackground: aFormOrColorOrFillStyle]
                 ifFalse: [self fillStyle: aFormOrColorOrFillStyle].!

Item was changed:
  ----- Method: SystemWindow>>createBox: (in category 'initialization') -----
  createBox: aForm
         "create a button with a form to be used in the label area"
        
         | box |
         box := SystemWindowButton new.
         box color: Color transparent;
                  target: self;
                  useSquareCorners;
                  borderWidth: 0;
+                 labelGraphic: aForm scaleIconToDisplay;
-                 labelGraphic: aForm;
                  extent: self boxExtent.
         ^ box!

Item was changed:
  ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') -----
  justDroppedInto: aMorph event: anEvent
 
         isCollapsed
                 ifTrue: [self position: ((self position max: 0@0) grid: 8@8).
                                 collapsedFrame := self bounds]
                 ifFalse: [fullFrame := self bounds].
 
         self beKeyWindow.
         self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:."
                        
         aMorph == self world ifTrue: [self assureLabelAreaVisible].
 
         (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop))
                 ifTrue: [
                         self removeProperty: #initialDrop.
                         (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: [])
                                 ifNotNil: [:grip |
                                         grip
                                                 referencePoint: anEvent position;
                                                 setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:".
+                                        self
+                                                hasDropShadow: false;
+                                                lookFocused.
+                                        anEvent hand newMouseFocus: grip.]].
-                                        self hasDropShadow: false.
-                                        anEvent hand newMouseFocus: grip]].
                        
         ^super justDroppedInto: aMorph event: anEvent!

Item was added:
+ ----- Method: TextMorph class>>string:fontName: (in category 'instance creation') -----
+ string: aString fontName: aName
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: TextStyle defaultFont pixelSize!

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: aSize
+                wrap: false "...because we don't know the initial width to wrap..."
+ !

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size:wrap: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize wrap: shouldWrap
+
+        ^ self new
+                string: aString fontName: aName size: aSize wrap: shouldWrap;
+                yourself!

Item was added:
+ ----- Method: TextMorph class>>string:size: (in category 'instance creation') -----
+ string: aString size: pixelSize
+
+        ^ self
+                string: aString
+                fontName: TextStyle defaultFont familyName
+                size: pixelSize!

Item was changed:
+ ----- Method: TextMorph>>fontName:pointSize: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:pointSize: (in category 'accessing') -----
  fontName: fontName pointSize: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         newTextStyle ifNil: [self error: 'font ', fontName, ' not found.'].
 
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfPointSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
+ ----- Method: TextMorph>>fontName:size: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:size: (in category 'accessing') -----
  fontName: fontName size: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
  ----- Method: TextMorph>>string:fontName:size:wrap: (in category 'initialization') -----
  string: aString fontName: aName size: aSize wrap: shouldWrap
 
         shouldWrap
                 ifTrue: [self contentsWrapped: aString]
+                ifFalse: [self contentsAsIs: aString].
+
-                ifFalse: [self contents: aString].
         self fontName: aName size: aSize!




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1547.mcz

Christoph Thiede

Okay, thank you :)


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 30. September 2019 15:48:07
An: Alan Grimes via Squeak-dev; [hidden email]
Betreff: Re: [squeak-dev] The Trunk: Morphic-mt.1547.mcz
 
The ancestry was fine or else you wouldn't see that:

Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Those commits did not depend on each other, so I could review them side-by-side and push them all at once to avoid noise on the mailing list. Also, I could copy all your versions to the Trunk.

Best,
Marcel

Am 30.09.2019 11:41:00 schrieb Thiede, Christoph <[hidden email]>:

Wow, thank you for your effort :-)


Did I handle the ancestry wrong again or is this excessive merging actually the usual workflow?


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Sonntag, 29. September 2019 19:05:47
An: [hidden email]; [hidden email]
Betreff: [squeak-dev] The Trunk: Morphic-mt.1547.mcz
 
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1547.mcz

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

Name: Morphic-mt.1547
Author: mt
Time: 29 September 2019, 7:05:40.322524 pm
UUID: d35fe693-b8fc-574c-a20b-0b5ce37208ad
Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Merge, merge, merge. :-)

Morphic-ct.1505 - halo scale up in demo mode
Morphic-ct.1506 - window icons scale up in demo mode
Morphic-ct.1507 - bugfix open tool attached to mouse
Morphic-ct.1514 - dialog code clean-up
Morphic-ct.1527 - CollapsedMorph
Morphic-ct.1530 - comments
Morphic-ct.1533 - fix in MorphicProject (fillStyle)
Morphic-ct.1535 - fix in MorphicProject (background)
Morphic-ct.1536 - TextMorph constructors

=============== Diff against Morphic-mt.1546 ===============

Item was added:
+ ----- Method: CollapsedMorph class>>createReplacementFor:in: (in category 'instance creation') -----
+ createReplacementFor: aMorph in: anOwner
+
+        ^ self new
+                beReplacementFor: aMorph in: anOwner;
+                yourself!

Item was changed:
  ----- Method: CollapsedMorph>>beReplacementFor: (in category 'collapse/expand') -----
  beReplacementFor: aMorph
+        "Encapsulate aMorph with the CollapsedMorph and display the latter"
 
+        | itsWorld |
-        | itsWorld priorPosition |
         (itsWorld := aMorph world) ifNil: [^self].
+        self beReplacementFor: aMorph in: itsWorld.!
-        uncollapsedMorph := aMorph.
-                       
-        self setLabel: aMorph externalName.
-        aMorph delete.
-        itsWorld addMorphFront: self.
-        self collapseOrExpand.
-        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
-        ifNotNil:
-                [self position: priorPosition].
- !

Item was added:
+ ----- Method: CollapsedMorph>>beReplacementFor:in: (in category 'collapse/expand') -----
+ beReplacementFor: aMorph in: anOwner
+        "Encapsulate aMorph with the CollapsedMorph and display the latter in anOwner"
+
+        | priorPosition |
+        uncollapsedMorph := aMorph.
+       
+        self setLabel: aMorph externalName.
+        aMorph delete.
+        self privateOwner: anOwner. "lest RealEstateAgent fail at positioning me"
+        self collapseOrExpand.
+        anOwner addMorphFront: self.
+        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
+                ifNotNil: [self position: priorPosition].!

Item was added:
+ ----- Method: CollapsedMorph>>centerWithWrappees: (in category 'adjusting') -----
+ centerWithWrappees: aPoint
+
+        self center: aPoint.
+        uncollapsedMorph center: aPoint.!

Item was added:
+ ----- Method: CollapsedMorph>>uncollapsedMorph (in category 'accessing') -----
+ uncollapsedMorph
+
+        ^ uncollapsedMorph!

Item was changed:
  ----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
  exploreInvocation
 
+        self exclusive: false.
+        (self findInvocationContext stack collect: #method)
+                explore!
-        | result context |
-        self exclusive: false. "We want to explore."
-
-        result := OrderedCollection new.
-        context := self findInvocationContext.
-       
-        [context sender] whileNotNil: [
-                result add: context method.
-                context := context sender].
-        result add: context method.
-
-        result explore.!

Item was changed:
  ----- Method: HaloMorph>>addHandlesForWorldHalos (in category 'private') -----
  addHandlesForWorldHalos
         "Add handles for world halos, like the man said"
 
         | box w |
         w := self world ifNil:[target world].
         self removeAllMorphs.  "remove old handles, if any"
         self bounds: target bounds.
         box := w bounds insetBy: self handleSize // 2.
         target addWorldHandlesTo: self box: box.
 
         Preferences uniqueNamesInHalos ifTrue:
                 [innerTarget assureExternalName].
+        self
+                addNameBeneath: ((box insetBy: (0@0 corner: 0@10))
+                        scaleBy: RealEstateAgent scaleFactor)
+                string: innerTarget externalName.
-        self addNameBeneath: (box insetBy: (0@0 corner: 0@10)) string: innerTarget externalName.
         growingOrRotating := false.
         self layoutChanged.
         self changed.
  !

Item was changed:
  ----- Method: HaloMorph>>basicBox (in category 'private') -----
  basicBox
+        | minSide outset anExtent aBox w |
-        | aBox minSide anExtent w |
         minSide := 4 * self handleSize.
+        outset := 8 * RealEstateAgent scaleFactor.
+        anExtent := (self extent + self handleSize + outset) max: minSide asPoint.
-        anExtent := ((self width + self handleSize + 8) max: minSide) @
-                                ((self height + self handleSize + 8) max: minSide).
         aBox := Rectangle center: self center extent: anExtent.
         w := self world ifNil:[target outermostWorldMorph].
         ^ w
                 ifNil:
                         [aBox]
                 ifNotNil:
                         [aBox intersect: (w viewBox insetBy: self handleSize // 2)]
  !

Item was changed:
  ----- Method: HaloMorph>>createHandleAt:color:iconName: (in category 'private') -----
  createHandleAt: aPoint color: aColor iconName: iconName
         | bou handle |
         bou := Rectangle center: aPoint extent: self handleSize asPoint.
         Preferences alternateHandlesLook
                 ifTrue: [handle := RectangleMorph newBounds: bou color: aColor.
                         handle useRoundedCorners.
                         self setColor: aColor toHandle: handle]
                 ifFalse: [handle := EllipseMorph newBounds: bou color: aColor].
         handle borderWidth: 0;
                  wantsYellowButtonMenu: false.
         ""
         iconName isNil
                 ifFalse: [| form |
                         form := ScriptingSystem formAtKey: iconName.
                         form isNil
                                 ifFalse: [| image |
                                         image := ImageMorph new.
+                                        image image: form scaleIconToDisplay.
-                                        image image: form.
                                         image color: aColor makeForegroundColor.
                                         image lock.
                                         handle addMorphCentered: image]].
         ""
         ^ handle!

Item was changed:
  ----- Method: HaloMorph>>handleSize (in category 'private') -----
  handleSize
+        ^ (Preferences biggerHandles
-        ^ Preferences biggerHandles
                 ifTrue: [30]
+                ifFalse: [16]) * RealEstateAgent scaleFactor!
-                ifFalse: [16]!

Item was changed:
  ----- Method: Morph>>hResizing (in category 'layout-properties') -----
  hResizing
         "Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:
                 #rigid                  -       do not resize the receiver
                 #spaceFill              -       resize to fill owner's available space
+                #shrinkWrap     -       resize to fit children
-                #shrinkWrap     - resize to fit children
         "
         | props |
         props := self layoutProperties.
         ^props ifNil:[#rigid] ifNotNil:[props hResizing].!

Item was changed:
  ----- Method: MorphicProject>>setAsBackground: (in category 'utilities') -----
  setAsBackground: aFormOrColorOrFillStyle
         "Set  aForm as a background image."
 
         | thisWorld newFill oldFill |
+        thisWorld := self world.
-        thisWorld := self currentWorld.
        
         oldFill := thisWorld fillStyle.
         thisWorld fillStyle: aFormOrColorOrFillStyle.
         newFill := thisWorld fillStyle.
        
         newFill rememberCommand:
                 (Command new cmdWording: 'set background to a picture' translated;
                         undoTarget: thisWorld selector: #fillStyle: argument: oldFill;
                         redoTarget: thisWorld selector: #fillStyle: argument: newFill).
        
+        thisWorld setProperty: #hasCustomBackground toValue: true.!
-        thisWorld setProperty: #hasCustomBackground toValue: true.
- !

Item was changed:
  ----- Method: MorphicProject>>setWorldBackground: (in category 'initialize') -----
  setWorldBackground: force
 
         ((world hasProperty: #hasCustomBackground) and: [force not])
                 ifTrue: [^ self].
 
         "If the user has a custom background, propagate it into the new project."
         ((Project current ~~ self and: [Project current isMorphic]) and: [Project current world hasProperty: #hasCustomBackground])
                 ifTrue: [
+                        world fillStyle: Project current world fillStyle copy.
-                        world fillStyle: Project current world fillStyle.
                         world setProperty: #hasCustomBackground toValue: true]
                 ifFalse: [
                         world removeProperty: #hasCustomBackground.
                         world fillStyle: (self userInterfaceTheme background ifNil: [self class defaultFill])].!

Item was changed:
  ----- Method: PasteUpMorph>>setAsBackground: (in category 'visual properties') -----
  setAsBackground: aFormOrColorOrFillStyle
 
+        | project |
+        (self outermostWorldMorph == self and: [(project := self project) isMorphic])
+                ifTrue: [project setAsBackground: aFormOrColorOrFillStyle]
-        (self outermostWorldMorph == self and: [Project current isMorphic])
-                ifTrue: [Project current setAsBackground: aFormOrColorOrFillStyle]
                 ifFalse: [self fillStyle: aFormOrColorOrFillStyle].!

Item was changed:
  ----- Method: SystemWindow>>createBox: (in category 'initialization') -----
  createBox: aForm
         "create a button with a form to be used in the label area"
        
         | box |
         box := SystemWindowButton new.
         box color: Color transparent;
                  target: self;
                  useSquareCorners;
                  borderWidth: 0;
+                 labelGraphic: aForm scaleIconToDisplay;
-                 labelGraphic: aForm;
                  extent: self boxExtent.
         ^ box!

Item was changed:
  ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') -----
  justDroppedInto: aMorph event: anEvent
 
         isCollapsed
                 ifTrue: [self position: ((self position max: 0@0) grid: 8@8).
                                 collapsedFrame := self bounds]
                 ifFalse: [fullFrame := self bounds].
 
         self beKeyWindow.
         self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:."
                        
         aMorph == self world ifTrue: [self assureLabelAreaVisible].
 
         (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop))
                 ifTrue: [
                         self removeProperty: #initialDrop.
                         (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: [])
                                 ifNotNil: [:grip |
                                         grip
                                                 referencePoint: anEvent position;
                                                 setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:".
+                                        self
+                                                hasDropShadow: false;
+                                                lookFocused.
+                                        anEvent hand newMouseFocus: grip.]].
-                                        self hasDropShadow: false.
-                                        anEvent hand newMouseFocus: grip]].
                        
         ^super justDroppedInto: aMorph event: anEvent!

Item was added:
+ ----- Method: TextMorph class>>string:fontName: (in category 'instance creation') -----
+ string: aString fontName: aName
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: TextStyle defaultFont pixelSize!

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: aSize
+                wrap: false "...because we don't know the initial width to wrap..."
+ !

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size:wrap: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize wrap: shouldWrap
+
+        ^ self new
+                string: aString fontName: aName size: aSize wrap: shouldWrap;
+                yourself!

Item was added:
+ ----- Method: TextMorph class>>string:size: (in category 'instance creation') -----
+ string: aString size: pixelSize
+
+        ^ self
+                string: aString
+                fontName: TextStyle defaultFont familyName
+                size: pixelSize!

Item was changed:
+ ----- Method: TextMorph>>fontName:pointSize: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:pointSize: (in category 'accessing') -----
  fontName: fontName pointSize: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         newTextStyle ifNil: [self error: 'font ', fontName, ' not found.'].
 
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfPointSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
+ ----- Method: TextMorph>>fontName:size: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:size: (in category 'accessing') -----
  fontName: fontName size: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
  ----- Method: TextMorph>>string:fontName:size:wrap: (in category 'initialization') -----
  string: aString fontName: aName size: aSize wrap: shouldWrap
 
         shouldWrap
                 ifTrue: [self contentsWrapped: aString]
+                ifFalse: [self contentsAsIs: aString].
+
-                ifFalse: [self contents: aString].
         self fontName: aName size: aSize!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.1547.mcz

Chris Muller-3
In reply to this post by marcel.taeumel
Thank you for crafting the ancestry to be more concise and readable!  This is much better than 8 individual "merge" versions..   :)

Best,
  Chris

On Mon, Sep 30, 2019 at 8:48 AM Marcel Taeumel <[hidden email]> wrote:
The ancestry was fine or else you wouldn't see that:

Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Those commits did not depend on each other, so I could review them side-by-side and push them all at once to avoid noise on the mailing list. Also, I could copy all your versions to the Trunk.

Best,
Marcel

Am 30.09.2019 11:41:00 schrieb Thiede, Christoph <[hidden email]>:

Wow, thank you for your effort :-)


Did I handle the ancestry wrong again or is this excessive merging actually the usual workflow?


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Sonntag, 29. September 2019 19:05:47
An: [hidden email]; [hidden email]
Betreff: [squeak-dev] The Trunk: Morphic-mt.1547.mcz
 
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1547.mcz

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

Name: Morphic-mt.1547
Author: mt
Time: 29 September 2019, 7:05:40.322524 pm
UUID: d35fe693-b8fc-574c-a20b-0b5ce37208ad
Ancestors: Morphic-mt.1546, Morphic-ct.1505, Morphic-ct.1506, Morphic-ct.1507, Morphic-ct.1514, Morphic-ct.1527, Morphic-ct.1530, Morphic-ct.1533, Morphic-ct.1535, Morphic-ct.1536

Merge, merge, merge. :-)

Morphic-ct.1505 - halo scale up in demo mode
Morphic-ct.1506 - window icons scale up in demo mode
Morphic-ct.1507 - bugfix open tool attached to mouse
Morphic-ct.1514 - dialog code clean-up
Morphic-ct.1527 - CollapsedMorph
Morphic-ct.1530 - comments
Morphic-ct.1533 - fix in MorphicProject (fillStyle)
Morphic-ct.1535 - fix in MorphicProject (background)
Morphic-ct.1536 - TextMorph constructors

=============== Diff against Morphic-mt.1546 ===============

Item was added:
+ ----- Method: CollapsedMorph class>>createReplacementFor:in: (in category 'instance creation') -----
+ createReplacementFor: aMorph in: anOwner
+
+        ^ self new
+                beReplacementFor: aMorph in: anOwner;
+                yourself!

Item was changed:
  ----- Method: CollapsedMorph>>beReplacementFor: (in category 'collapse/expand') -----
  beReplacementFor: aMorph
+        "Encapsulate aMorph with the CollapsedMorph and display the latter"
 
+        | itsWorld |
-        | itsWorld priorPosition |
         (itsWorld := aMorph world) ifNil: [^self].
+        self beReplacementFor: aMorph in: itsWorld.!
-        uncollapsedMorph := aMorph.
-                       
-        self setLabel: aMorph externalName.
-        aMorph delete.
-        itsWorld addMorphFront: self.
-        self collapseOrExpand.
-        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
-        ifNotNil:
-                [self position: priorPosition].
- !

Item was added:
+ ----- Method: CollapsedMorph>>beReplacementFor:in: (in category 'collapse/expand') -----
+ beReplacementFor: aMorph in: anOwner
+        "Encapsulate aMorph with the CollapsedMorph and display the latter in anOwner"
+
+        | priorPosition |
+        uncollapsedMorph := aMorph.
+       
+        self setLabel: aMorph externalName.
+        aMorph delete.
+        self privateOwner: anOwner. "lest RealEstateAgent fail at positioning me"
+        self collapseOrExpand.
+        anOwner addMorphFront: self.
+        (priorPosition := aMorph valueOfProperty: #collapsedPosition ifAbsent: [nil])
+                ifNotNil: [self position: priorPosition].!

Item was added:
+ ----- Method: CollapsedMorph>>centerWithWrappees: (in category 'adjusting') -----
+ centerWithWrappees: aPoint
+
+        self center: aPoint.
+        uncollapsedMorph center: aPoint.!

Item was added:
+ ----- Method: CollapsedMorph>>uncollapsedMorph (in category 'accessing') -----
+ uncollapsedMorph
+
+        ^ uncollapsedMorph!

Item was changed:
  ----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
  exploreInvocation
 
+        self exclusive: false.
+        (self findInvocationContext stack collect: #method)
+                explore!
-        | result context |
-        self exclusive: false. "We want to explore."
-
-        result := OrderedCollection new.
-        context := self findInvocationContext.
-       
-        [context sender] whileNotNil: [
-                result add: context method.
-                context := context sender].
-        result add: context method.
-
-        result explore.!

Item was changed:
  ----- Method: HaloMorph>>addHandlesForWorldHalos (in category 'private') -----
  addHandlesForWorldHalos
         "Add handles for world halos, like the man said"
 
         | box w |
         w := self world ifNil:[target world].
         self removeAllMorphs.  "remove old handles, if any"
         self bounds: target bounds.
         box := w bounds insetBy: self handleSize // 2.
         target addWorldHandlesTo: self box: box.
 
         Preferences uniqueNamesInHalos ifTrue:
                 [innerTarget assureExternalName].
+        self
+                addNameBeneath: ((box insetBy: (0@0 corner: 0@10))
+                        scaleBy: RealEstateAgent scaleFactor)
+                string: innerTarget externalName.
-        self addNameBeneath: (box insetBy: (0@0 corner: 0@10)) string: innerTarget externalName.
         growingOrRotating := false.
         self layoutChanged.
         self changed.
  !

Item was changed:
  ----- Method: HaloMorph>>basicBox (in category 'private') -----
  basicBox
+        | minSide outset anExtent aBox w |
-        | aBox minSide anExtent w |
         minSide := 4 * self handleSize.
+        outset := 8 * RealEstateAgent scaleFactor.
+        anExtent := (self extent + self handleSize + outset) max: minSide asPoint.
-        anExtent := ((self width + self handleSize + 8) max: minSide) @
-                                ((self height + self handleSize + 8) max: minSide).
         aBox := Rectangle center: self center extent: anExtent.
         w := self world ifNil:[target outermostWorldMorph].
         ^ w
                 ifNil:
                         [aBox]
                 ifNotNil:
                         [aBox intersect: (w viewBox insetBy: self handleSize // 2)]
  !

Item was changed:
  ----- Method: HaloMorph>>createHandleAt:color:iconName: (in category 'private') -----
  createHandleAt: aPoint color: aColor iconName: iconName
         | bou handle |
         bou := Rectangle center: aPoint extent: self handleSize asPoint.
         Preferences alternateHandlesLook
                 ifTrue: [handle := RectangleMorph newBounds: bou color: aColor.
                         handle useRoundedCorners.
                         self setColor: aColor toHandle: handle]
                 ifFalse: [handle := EllipseMorph newBounds: bou color: aColor].
         handle borderWidth: 0;
                  wantsYellowButtonMenu: false.
         ""
         iconName isNil
                 ifFalse: [| form |
                         form := ScriptingSystem formAtKey: iconName.
                         form isNil
                                 ifFalse: [| image |
                                         image := ImageMorph new.
+                                        image image: form scaleIconToDisplay.
-                                        image image: form.
                                         image color: aColor makeForegroundColor.
                                         image lock.
                                         handle addMorphCentered: image]].
         ""
         ^ handle!

Item was changed:
  ----- Method: HaloMorph>>handleSize (in category 'private') -----
  handleSize
+        ^ (Preferences biggerHandles
-        ^ Preferences biggerHandles
                 ifTrue: [30]
+                ifFalse: [16]) * RealEstateAgent scaleFactor!
-                ifFalse: [16]!

Item was changed:
  ----- Method: Morph>>hResizing (in category 'layout-properties') -----
  hResizing
         "Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:
                 #rigid                  -       do not resize the receiver
                 #spaceFill              -       resize to fill owner's available space
+                #shrinkWrap     -       resize to fit children
-                #shrinkWrap     - resize to fit children
         "
         | props |
         props := self layoutProperties.
         ^props ifNil:[#rigid] ifNotNil:[props hResizing].!

Item was changed:
  ----- Method: MorphicProject>>setAsBackground: (in category 'utilities') -----
  setAsBackground: aFormOrColorOrFillStyle
         "Set  aForm as a background image."
 
         | thisWorld newFill oldFill |
+        thisWorld := self world.
-        thisWorld := self currentWorld.
        
         oldFill := thisWorld fillStyle.
         thisWorld fillStyle: aFormOrColorOrFillStyle.
         newFill := thisWorld fillStyle.
        
         newFill rememberCommand:
                 (Command new cmdWording: 'set background to a picture' translated;
                         undoTarget: thisWorld selector: #fillStyle: argument: oldFill;
                         redoTarget: thisWorld selector: #fillStyle: argument: newFill).
        
+        thisWorld setProperty: #hasCustomBackground toValue: true.!
-        thisWorld setProperty: #hasCustomBackground toValue: true.
- !

Item was changed:
  ----- Method: MorphicProject>>setWorldBackground: (in category 'initialize') -----
  setWorldBackground: force
 
         ((world hasProperty: #hasCustomBackground) and: [force not])
                 ifTrue: [^ self].
 
         "If the user has a custom background, propagate it into the new project."
         ((Project current ~~ self and: [Project current isMorphic]) and: [Project current world hasProperty: #hasCustomBackground])
                 ifTrue: [
+                        world fillStyle: Project current world fillStyle copy.
-                        world fillStyle: Project current world fillStyle.
                         world setProperty: #hasCustomBackground toValue: true]
                 ifFalse: [
                         world removeProperty: #hasCustomBackground.
                         world fillStyle: (self userInterfaceTheme background ifNil: [self class defaultFill])].!

Item was changed:
  ----- Method: PasteUpMorph>>setAsBackground: (in category 'visual properties') -----
  setAsBackground: aFormOrColorOrFillStyle
 
+        | project |
+        (self outermostWorldMorph == self and: [(project := self project) isMorphic])
+                ifTrue: [project setAsBackground: aFormOrColorOrFillStyle]
-        (self outermostWorldMorph == self and: [Project current isMorphic])
-                ifTrue: [Project current setAsBackground: aFormOrColorOrFillStyle]
                 ifFalse: [self fillStyle: aFormOrColorOrFillStyle].!

Item was changed:
  ----- Method: SystemWindow>>createBox: (in category 'initialization') -----
  createBox: aForm
         "create a button with a form to be used in the label area"
        
         | box |
         box := SystemWindowButton new.
         box color: Color transparent;
                  target: self;
                  useSquareCorners;
                  borderWidth: 0;
+                 labelGraphic: aForm scaleIconToDisplay;
-                 labelGraphic: aForm;
                  extent: self boxExtent.
         ^ box!

Item was changed:
  ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') -----
  justDroppedInto: aMorph event: anEvent
 
         isCollapsed
                 ifTrue: [self position: ((self position max: 0@0) grid: 8@8).
                                 collapsedFrame := self bounds]
                 ifFalse: [fullFrame := self bounds].
 
         self beKeyWindow.
         self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:."
                        
         aMorph == self world ifTrue: [self assureLabelAreaVisible].
 
         (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop))
                 ifTrue: [
                         self removeProperty: #initialDrop.
                         (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: [])
                                 ifNotNil: [:grip |
                                         grip
                                                 referencePoint: anEvent position;
                                                 setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:".
+                                        self
+                                                hasDropShadow: false;
+                                                lookFocused.
+                                        anEvent hand newMouseFocus: grip.]].
-                                        self hasDropShadow: false.
-                                        anEvent hand newMouseFocus: grip]].
                        
         ^super justDroppedInto: aMorph event: anEvent!

Item was added:
+ ----- Method: TextMorph class>>string:fontName: (in category 'instance creation') -----
+ string: aString fontName: aName
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: TextStyle defaultFont pixelSize!

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize
+
+        ^ self
+                string: aString
+                fontName: aName
+                size: aSize
+                wrap: false "...because we don't know the initial width to wrap..."
+ !

Item was added:
+ ----- Method: TextMorph class>>string:fontName:size:wrap: (in category 'instance creation') -----
+ string: aString fontName: aName size: aSize wrap: shouldWrap
+
+        ^ self new
+                string: aString fontName: aName size: aSize wrap: shouldWrap;
+                yourself!

Item was added:
+ ----- Method: TextMorph class>>string:size: (in category 'instance creation') -----
+ string: aString size: pixelSize
+
+        ^ self
+                string: aString
+                fontName: TextStyle defaultFont familyName
+                size: pixelSize!

Item was changed:
+ ----- Method: TextMorph>>fontName:pointSize: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:pointSize: (in category 'accessing') -----
  fontName: fontName pointSize: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         newTextStyle ifNil: [self error: 'font ', fontName, ' not found.'].
 
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfPointSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
+ ----- Method: TextMorph>>fontName:size: (in category 'initialization') -----
- ----- Method: TextMorph>>fontName:size: (in category 'accessing') -----
  fontName: fontName size: fontSize
         | newTextStyle |
         newTextStyle := ((TextStyle named: fontName asSymbol) ifNil: [ TextStyle default ]) copy.
         textStyle := newTextStyle.
         text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOfSize: fontSize)).
+        self releaseParagraph.!
-        paragraph ifNotNil: [paragraph textStyle: newTextStyle]!

Item was changed:
  ----- Method: TextMorph>>string:fontName:size:wrap: (in category 'initialization') -----
  string: aString fontName: aName size: aSize wrap: shouldWrap
 
         shouldWrap
                 ifTrue: [self contentsWrapped: aString]
+                ifFalse: [self contentsAsIs: aString].
+
-                ifFalse: [self contents: aString].
         self fontName: aName size: aSize!