<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
I forgot to mention that this commit depends on System-mt<a href="tel:+491102">.1102</a>.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<span id="OutlookSignature">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Mit freundlichen Grüßen<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Christoph Thiede<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Hasso-Plattner-Institut für Softwaresystemtechnik GmbH, Potsdam<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Amtsgericht Potsdam, HRB 12184<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Geschäftsführung: Prof. Dr. Christoph Meinel</div>
</span><br>
</div>
<br>
<br>
<br>
<div class="gmail_quote">On Tue, Oct 1, 2019 at 4:14 PM +0200, "commits@source.squeak.org"
<span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="3D"ltr"">
<pre>A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1556.mcz

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

Name: Morphic-ct.1556
Author: ct
Time: 1 October 2019, 4:14:07.036339 pm
UUID: b353603d-f85b-6f45-b660-2f137d99eb5d
Ancestors: Morphic-ul.1552

Complements System-ct.1106 and reworks ProjectViewMorph preview sizes.

Fixes a bug since a few commits, where ProjectViewMorphs without windows have the full size of their model's world. Extract #initialExtent, use a modern value, and set it respecting scaleFactor. Simplify #on: paths. Simplify #openOn: and use RealEstateAgent for convenience.

=============== Diff against Morphic-ul.1552 ===============

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

Item was changed:
  ----- Method: ProjectViewMorph class>>newProjectViewInAWindowFor: (in category 'project window creation') -----
  newProjectViewInAWindowFor: aProject
        "Return an instance of me on a new Morphic project (in a SystemWindow)."
  
        | window proj |
        proj := self on: aProject.
        window := (SystemWindow labelled: aProject name) model: aProject.
+   window extent: proj extent.
        window
                addMorph: proj
                frame: (0@0 corner: 1.0@1.0).
        proj borderWidth: 0.
        ^ window
  !

Item was changed:
  ----- Method: ProjectViewMorph class>>openOn: (in category 'instance creation') -----
  openOn: aProject
        "Open a ProjectViewMorph for the project in question"
+   ProjectViewOpenNotification signal ifFalse: [^ self].
+   
+   (Preferences projectViewsInWindows
+           ifTrue: [ (self newProjectViewInAWindowFor: aProject) ]
+           ifFalse: [ (self on: aProject) ])
+                   openAsTool.!
-       ProjectViewOpenNotification signal ifTrue: [
-               Preferences projectViewsInWindows ifTrue: [
-                       (self newProjectViewInAWindowFor: aProject) openInWorld
-               ] ifFalse: [
-                       (self on: aProject) openInWorld         "but where??"
-               ].
-       ].
- !

Item was added:
+ ----- Method: ProjectViewMorph>>initialExtent (in category 'geometry') -----
+ initialExtent

+   ^ 300 @ 200!

Item was changed:
  ----- Method: ProjectViewMorph>>initialize (in category 'initialization') -----
  initialize
        "Initialize the receiver."
  
        super initialize.
+   self extent: self initialExtent * RealEstateAgent scaleFactor.
        "currentBorderColor := Color gray."
        self addProjectNameMorphFiller.
        self enableDragNDrop: true.
        self isOpaque: true.
  !

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


</pre>
</div>
</blockquote>
</div>
</body>
</html>