<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Chris --<div><br></div><div>In "ToolBuilder-Morphic-mt.270", I tweaked a dialog's minimal size for smaller lists and added an expand button so that you can see more at once. I am aware that this is just a compromise to your proposed changes. Can you work with that? :-)</div><div><br></div><div><a href="http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-270-mcz-td5126091.html"><span style="font-size: 10pt">http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-270-mcz-td5126091.html</span></a><br></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">And I just realized that you did not propose a "breathing space" but just estimated the dialogs decorations around the central pane.  My bad. Well, there is now extra space to breathe. We might remove that as well.</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Best,</span></div><div><span style="font-size: 13.3333px">Marcel</span></div><div><br></div><div class="mb_sig"></div>
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 11.01.2021 11:30:29 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Still, it makes me wonder if you ever you "list filtering" in such dialogs? You seem to want to optimize the users browsing experience, not the searching experience.<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 11.01.2021 11:27:13 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi --<div><br></div><div><span style="font-size: 10pt">From my experience with the codebase in Squeak 3 and 4, any magic buffers such as "20" and "40" should be avoided for the sake of HI-DPI and hard-to-debug UI glitches. Deriving such buffers from the current font metrics seems to be more robust. Note that, in general, I am not opposed to giving content "more space to breathe" :-)</span><br></div><div><br></div><div>Having to iterate over all items in a list is too costly for larger lists. The LazyListMorph attempt to only consider a sample proved to entail annoying UI glitches such as shaky UI elements while scrolling.</div><div><br></div><div>Here are some numbers:</div><div><br></div><div><div><span style="font-size: 13.3333px">font := TextStyle defaultFont.</span></div><div><span style="font-size: 13.3333px">items := SystemNavigation default allClasses collect: [:class | class name].</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">[items do: [:item | font widthOfString: item]] bench.</span></div><div><span style="font-size: 13.3333px">'718 per second. 1.39 milliseconds per run. 0 % GC time.'</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">[(20 * (font widthOf: $m))@(15 * font height)] bench.</span></div><div><span style="font-size: 13.3333px">'22,000,000 per second. 45.4 nanoseconds per run. 2.47901 % GC time.'</span></div></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Having milliseconds for a simple thing such as #initialExtent is really an issue for snappy GUIs because, for example, there are only 25 milliseconds for a frame in 40 FPS.</span></div><div><br></div><div>***</div><div><br></div><div>All in all, you are oppsed to always make room for 15 items and (roughly) 20 characters per item. So, I suggest that we could make the 15 derived from the actual number of items ... plus 1-2 if you want to leave more whitespace. For the 20, I would suggest to only count the number of characters and multiply with that width-of-$m. For performance reasons:</div><div><br></div><div><div><span style="font-size: 13.3333px">[items inject: 0 into: [:max :item | max max: item size]] bench.</span></div><div><span style="font-size: 13.3333px">'30,200 per second. 33.1 microseconds per run. 0.05999 % GC time.'</span></div></div><div><br></div><div>Yes, we could watch out for the size of #currentWorld, as you suggested. But this already happens via RealEstateAgent class >> maximumUsableAreaInWorld: as well as sends of #translatedToBeWithin: to a world's bounds. No need to duplicate and scatter those constraints all over the code base. :-) ... That said ... I think there is a bug in DialogWindow >> #moveToPreferredPosition and also in its initial extent. DialogWindow does not talk to RealEstateAgent at all ...</div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div>P.S.: <span style="font-size: 10pt">How can you know that "item" is something that works with #widthOfString:? :-) Could be an instance of Text, for example.</span></div><div class="mb_sig"></div>
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 08.01.2021 20:27:56 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">A new version of ToolBuilder-Morphic was added to project The Inbox:<br>http://source.squeak.org/inbox/ToolBuilder-Morphic-cbc.270.mcz<br><br>==================== Summary ====================<br><br>Name: ToolBuilder-Morphic-cbc.270<br>Author: cbc<br>Time: 8 January 2021, 11:27:47.8204 am<br>UUID: abbbeb8a-9a8b-ef4a-b6a9-051b55cc2d5b<br>Ancestors: ToolBuilder-Morphic-mt.269<br><br>Set the initial extent of the ListChooser to not require resizing the dialog for reasonable sized lists (i.e., expand it so you can see all of the list).<br>At the small end, still object MT's suggested size; at the large end, will not take up more the 3/4ths of the world size.<br><br>=============== Diff against ToolBuilder-Morphic-mt.269 ===============<br><br>Item was changed:<br>  ----- Method: ListChooser>>initialExtent (in category 'building') -----<br>  initialExtent<br>+       | listFont width height |<br>- <br>-        | listFont |<br>          listFont := Preferences standardListFont.<br>+    width := (items collect: [:item| listFont widthOfString: item]) max + 20 "Acutal size of items plus dialog buffer left/right"<br>+              max: (20 * (listFont widthOf: $m)). "but we want a not-too-small box as well"<br>+      height := ((items size max: 15) * listFont height) + 40. "for various other stuff in dialog above/below list"<br>+      "But, don't use the whole world."<br>+  width := width min: (self currentWorld extent x * 0.75) asInteger.<br>+   height := height min: (self currentWorld extent y * 0.75) asInteger.<br>+         ^ width@height!<br>-      ^ (20 * (listFont widthOf: $m))@(15 * listFont height)!<br><br><br></div></blockquote></div></div></blockquote>
                                        </div></div></blockquote></div>