<div dir="ltr">It looks like it is 2 pixels short for height. If the size list size is between 5 and 15, it will include the vertical scroll bar to scroll for those 2 pixels (or, I am guessing, however big the list box boundary line is).<div><br><div>It looks like the width is short by the padding size before and after the text - maybe adding an $m width to the horizontal size would make it better (or figure out what the right padding + list box boundary line width is and add it in).</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 11, 2021 at 10:17 AM Chris Cunningham <<a href="mailto:cunningham.cb@gmail.com">cunningham.cb@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><img src="cid:ii_kjsw1cup0" alt="image.png" width="172" height="200"><br><div>and</div><div><img src="cid:ii_kjsw214f1" alt="image.png" width="414" height="166"><br></div><div>close enough.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 11, 2021 at 10:16 AM <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A new version of ToolBuilder-Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/ToolBuilder-Morphic-cbc.271.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/ToolBuilder-Morphic-cbc.271.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: ToolBuilder-Morphic-cbc.271<br>
Author: cbc<br>
Time: 11 January 2021, 10:15:51.0644 am<br>
UUID: 76f9fb95-5700-1b43-a9af-9ab88aaa890f<br>
Ancestors: ToolBuilder-Morphic-mt.270<br>
<br>
Let the width of List Chooser try to accomodate better to the actual size of the string.<br>
<br>
=============== Diff against ToolBuilder-Morphic-mt.270 ===============<br>
<br>
Item was changed:<br>
----- Method: ListChooser>>initialExtent (in category 'building') -----<br>
initialExtent<br>
+ | listFont itemCount width |<br>
- <br>
- | listFont itemCount maxItemSize cellSize |<br>
listFont := Preferences standardListFont.<br>
itemCount := items size.<br>
+ width := ((items take: 15) collect: [:item| listFont widthOfString: item]) max.<br>
+ ^ (width min: (self currentWorld extent x * 0.75) asInteger max: ((listFont widthOf: $m) * 12))<br>
+ @ ((itemCount min: 15 max: 5) * listFont height + self searchBarHeight) <br>
+ !<br>
- maxItemSize := items inject: 0 into: [:max :item | max max: item size].<br>
- cellSize := (listFont widthOf: $m) @ listFont height.<br>
- <br>
- ^ ((maxItemSize + 1 "breathing space" min: 20 max: 10)<br>
- @ (itemCount + 1 "breathing space" min: 15 max: 5)<br>
- * cellSize) + (0@ self searchBarHeight)!<br>
<br>
<br>
</blockquote></div>
</blockquote></div>