<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Before:</p>
<p><img size="10024" id="x_img563120" tabindex="0" style="max-width:99.9%" src="cid:c75da1d0-da3f-4159-a7aa-dc1c11ce13bc"><br>
</p>
<p><br>
</p>
<p>After:</p>
<p><img size="9999" id="x_img263010" tabindex="0" style="max-width:99.9%" src="cid:f599213d-5975-464b-8c55-7c17433719f3"><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Donnerstag, 19. Mai 2022 15:47:50<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: ToolBuilder-Morphic-ct.317.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">A new version of ToolBuilder-Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/ToolBuilder-Morphic-ct.317.mcz">http://source.squeak.org/inbox/ToolBuilder-Morphic-ct.317.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: ToolBuilder-Morphic-ct.317<br>
Author: ct<br>
Time: 19 May 2022, 3:47:49.33378 pm<br>
UUID: 5229468a-f32e-ea4a-89f6-fde8487dda34<br>
Ancestors: ToolBuilder-Morphic-mt.316<br>
<br>
Proposal: Do not limit the average line length of a pluggable dialog window's message unnecessarily when a larger initial extent was specified.<br>
<br>
For later, it would be nice if we had normal window grips instead and the message text would always wrap automatically.<br>
<br>
Is there a better pattern for computing the inverse of averageLineLength?<br>
<br>
=============== Diff against ToolBuilder-Morphic-mt.316 ===============<br>
<br>
Item was changed:<br>
  ----- Method: MorphicToolBuilder>>buildPluggableDialog: (in category 'widgets optional') -----<br>
  buildPluggableDialog: aSpec<br>
  <br>
         | widget |<br>
  <br>
         widget := self dialogClass new.<br>
         self register: widget id: aSpec name.<br>
         <br>
         widget model: aSpec model.<br>
  <br>
         "Set child dependent layout properties. The pane morph holds the special contents."<br>
         widget paneMorph wantsPaneSplitters: (aSpec wantsResizeHandles ifNil: [true]).<br>
         self setLayoutHintsFor: widget paneMorph spec: aSpec.<br>
         widget paneMorph layoutInset: (aSpec padding ifNil: [self dialogPadding]).<br>
         widget morphicLayerNumber: widget class dialogLayer.<br>
  <br>
         "Performance. Flip the #wantsPaneSplitters flag only after all children where added."<br>
         widget paneMorph cellGap: 0.<br>
         widget paneMorph wantsPaneSplitters: false; wantsGrips: false.<br>
         widget paneMorph removePaneSplitters; removeGrips.<br>
  <br>
         "Now create the children."<br>
         panes := OrderedCollection new.<br>
         aSpec children isSymbol<br>
                 ifTrue: [<br>
                         widget getChildrenSelector: aSpec children.<br>
                         widget update: aSpec children]<br>
                 ifFalse: [<br>
                         self buildAll: aSpec children in: widget paneMorph].<br>
  <br>
         "Avoid strange behavior in #addMorph:fullFrame:"<br>
         widget paneMorph cellGap: (aSpec spacing ifNil: [self dialogSpacing]).<br>
         widget paneMorph wantsPaneSplitters: (aSpec wantsResizeHandles ifNil: [true]).<br>
         widget paneMorph wantsPaneSplitters ifTrue: [<br>
                 widget paneMorph wantsGrips: true.      <br>
                 widget paneMorph addPaneSplitters; addCornerGrips"; addEdgeGrips".<br>
                 widget paneMorph grips do: [:ea | ea showHandle: true]].<br>
  <br>
+        widget updateAverageLineLength.<br>
-        "Increase the line width of the dialog's message to allow that longer messages accompany complex paneMorph contents."<br>
-        widget messageMorph averageLineLength: 65.<br>
  <br>
         "Now create the buttons."<br>
         aSpec buttons isSymbol<br>
                 ifTrue: [<br>
                         widget getButtonsSelector: aSpec buttons.<br>
                         widget update: aSpec buttons]<br>
                 ifFalse: [<br>
                         self buildAll: aSpec buttons in: widget buttonRowMorph.<br>
                         widget updateButtonProperties].<br>
  <br>
         aSpec title ifNotNil: [:label |<br>
                 label isSymbol <br>
                         ifTrue:[widget getTitleSelector: label; update: label]<br>
                         ifFalse:[widget title: label]].<br>
         aSpec message ifNotNil: [:label |<br>
                 label isSymbol <br>
                         ifTrue:[widget getMessageSelector: label; update: label]<br>
                         ifFalse:[widget message: label]].<br>
         <br>
         "Interaction behavior."<br>
         aSpec autoCancel ifNotNil: [:b | widget autoCancel: b].<br>
         aSpec exclusive ifNotNil: [:b | widget exclusive: b].<br>
                 <br>
         widget closeDialogSelector: aSpec closeAction.<br>
         self buildHelpFor: widget spec: aSpec. <br>
  <br>
         "Everything is shrink-wrapped around the pane morph."<br>
         widget paneMorph extent: (aSpec extent ifNil:[widget initialExtent])<br>
                 + (widget paneMorph layoutInset * 2) asPoint.<br>
  <br>
         ^ widget!<br>
<br>
Item was added:<br>
+ ----- Method: PluggableDialogWindow>>updateAverageLineLength (in category 'updating') -----<br>
+ updateAverageLineLength<br>
+        "Increase the line width of the dialog's message to allow that longer messages accompany complex paneMorph contents."<br>
+ <br>
+        | message |<br>
+        message := self messageMorph.<br>
+        message averageLineLength:<br>
+                (65 max:<br>
+                        (self initialExtent x / (message textStyle compositionWidthFor: 1))).!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>