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

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

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

Name: Morphic-mt.1516
Author: mt
Time: 6 September 2019, 4:03:37.533193 pm
UUID: 2d90c461-65ef-814d-9169-af6f305d059a
Ancestors: Morphic-ct.1515

Correctly initialize a world's viewbox. Drop the paragraph workaround for viewbox updates. Use new #previewImageForm for ProjectViewMorph to get a preview without entering the project.

Thanks to Christoph (ct) for the idea!

=============== Diff against Morphic-ct.1515 ===============

Item was added:
+ ----- Method: MorphicProject>>previewImageForm (in category 'display') -----
+ previewImageForm
+
+ ^ self world imageForm!

Item was changed:
  ----- Method: PasteUpMorph>>initForProject: (in category 'world state') -----
  initForProject: aWorldState
 
  worldState := aWorldState.
+ self viewBox: Display boundingBox.  
- bounds := Display boundingBox.
  self color: Preferences defaultWorldColor.
  self addHand: HandMorph new.
  self setProperty: #automaticPhraseExpansion toValue: true.
  self setProperty: #optimumExtentFromAuthor toValue: Display extent.
  self wantsMouseOverHalos: Preferences mouseOverHalos.
  self borderWidth: 0.
  model := nil.
  !

Item was changed:
  ----- Method: PasteUpMorph>>viewBox: (in category 'project state') -----
  viewBox: newViewBox
  "I am now displayed within newViewBox; react."
 
+ self isWorldMorph ifTrue: [
+ (self viewBox isNil or: [self viewBox extent ~= newViewBox extent])
+ ifTrue: [worldState canvas: nil].
+ worldState viewBox: newViewBox].
+
- self isWorldMorph
- ifTrue:
- [(self viewBox isNil or: [self viewBox extent ~= newViewBox extent])
- ifTrue: [worldState canvas: nil].
- worldState viewBox: newViewBox].
  super position: newViewBox topLeft.
+
+ fullBounds := bounds := newViewBox.!
- fullBounds := bounds := newViewBox.
-
- "Paragraph problem workaround; clear selections to avoid screen
- droppings."
- self flag: #arNote. "Probably unnecessary"
- self isWorldMorph
- ifTrue:
- [worldState handsDo: [:hand | hand releaseKeyboardFocus].
- self fullRepaintNeeded]!

Item was changed:
  ----- Method: ProjectViewMorph>>on: (in category 'events') -----
  on: aProject
 
  project := aProject.
  self addProjectNameMorphFiller.
  lastProjectThumbnail := nil.
+ project thumbnail: project previewImageForm.
  project thumbnail
  ifNil: [self extent: 100@80] "more like screen dimensions?"
+ ifNotNil: [self extent: project thumbnail extent].!
- ifNotNil: [self extent: project thumbnail extent].
- !

Item was changed:
+ ----- Method: TransformMorph>>layoutChanged (in category 'layout') -----
- ----- Method: TransformMorph>>layoutChanged (in category 'geometry') -----
  layoutChanged
 
  "A submorph could have moved, thus changing my localBounds. Invalidate the cache."
  localBounds := nil.
  super layoutChanged.!