<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>> <span style="font-size:12pt">This also fixes some toolbuilding issues for huge scale factors (even though most default values (e.g., ScrollPane>>#defaultExtent) will be overridden by the ToolBuilder, they are still present before a morph is finally layouted).</span></p>
<div><br>
</div>
<p></p>
<p><span style="font-size:12pt">Here is a more detailed description of these issues:</span><br>
</p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">For a huge scale factor such as 1000%, lists had an unintended extra offset when the model indicated a selection during initial construction, as illustrated in the attached screenshot. This was caused by too-low lists (see <span>ScrollPane>>defaultExtent).
 I'm still not sure whether it is a general issue that lists might be scaled up after the send to #<span>updateListSelection ...</span></span></span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Best,</span></p>
<p><span style="font-size:12pt">Christoph</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt"><img size="92817" id="x_img930219" tabindex="0" height="180" style="" src="cid:f8bb52ae-0422-4ddf-b351-2079c06e40e8"><br>
</span></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> Montag, 10. Oktober 2022 15:13:27<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Trunk: Morphic-ct.2048.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Christoph Thiede uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-ct.2048.mcz">http://source.squeak.org/trunk/Morphic-ct.2048.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-ct.2048<br>
Author: ct<br>
Time: 10 October 2022, 3:13:21.840054 pm<br>
UUID: c9b105e6-27ff-4247-b606-c6414ecbdfe6<br>
Ancestors: Morphic-ct.2047<br>
<br>
Makes ScrollPane and MenuItemMorph high-dpi-sensitive. This also fixes some toolbuilding issues for huge scale factors (even though most default values (e.g., ScrollPane>>#defaultExtent) will be overridden by the ToolBuilder, they are still present before a
 morph is finally layouted).<br>
<br>
=============== Diff against Morphic-ct.2047 ===============<br>
<br>
Item was changed:<br>
  ----- Method: MenuItemMorph>>contentString: (in category 'accessing') -----<br>
  contentString: aString <br>
+        self flag: #ct. "Can we deprecate this?"<br>
         aString <br>
                 ifNil: [self removeProperty: #contentString]<br>
                 ifNotNil: [self setProperty: #contentString toValue: aString]!<br>
<br>
Item was changed:<br>
  ----- Method: MenuItemMorph>>defaultBounds (in category 'initialization') -----<br>
  defaultBounds<br>
  "answer the default bounds for the receiver"<br>
+        ^ 0 @ 0 extent: 10 px @ 10 px!<br>
-        ^ 0 @ 0 extent: 10 @ 10!<br>
<br>
Item was changed:<br>
  ----- Method: MenuItemMorph>>drawLabelOn: (in category 'drawing') -----<br>
  drawLabelOn: aCanvas <br>
  <br>
         | stringBounds |        <br>
         stringBounds := self bounds.<br>
         <br>
         self hasIcon ifTrue: [<br>
+                stringBounds := stringBounds left: stringBounds left + self iconForm width + 2 px ].<br>
-                stringBounds := stringBounds left: stringBounds left + self iconForm width + 2 ].<br>
         self hasMarker ifTrue: [<br>
+                stringBounds := stringBounds left: stringBounds left + self submorphBounds width + 8 px ].<br>
-                stringBounds := stringBounds left: stringBounds left + self submorphBounds width + 8 ].<br>
         <br>
         aCanvas<br>
                 drawString: self contents<br>
                 at: stringBounds left @ (stringBounds center y - (self fontToUse height // 2))<br>
                 font: self fontToUse<br>
                 color: self colorToUse.!<br>
<br>
Item was changed:<br>
  ----- Method: MenuItemMorph>>minHeight (in category 'layout') -----<br>
  minHeight<br>
         | iconHeight |<br>
         iconHeight := self hasIcon<br>
+                                ifTrue: [self icon height + 2 px]<br>
-                                ifTrue: [self icon height + 2]<br>
                                 ifFalse: [0].<br>
         ^ self fontToUse lineGridForMorphs max: iconHeight!<br>
<br>
Item was changed:<br>
  ----- Method: MenuItemMorph>>minWidth (in category 'layout') -----<br>
  minWidth<br>
  <br>
         | subMenuWidth iconWidth markerWidth |<br>
         subMenuWidth := self hasSubMenu<br>
                 ifTrue: [ 10 ]<br>
                 ifFalse: [ 0 ].<br>
         iconWidth := self hasIcon<br>
+                ifTrue: [ self icon width + 2 px ]<br>
-                ifTrue: [ self icon width + 2 ]<br>
                 ifFalse: [ 0 ].<br>
         markerWidth := self hasMarker<br>
+                ifTrue: [ self submorphBounds width + 8 px ]<br>
-                ifTrue: [ self submorphBounds width + 8 ]<br>
                 ifFalse: [ 0 ].<br>
         ^(self fontToUse widthOfString: contents)<br>
                 + subMenuWidth + iconWidth + markerWidth + self stringMargin!<br>
<br>
Item was changed:<br>
  ----- Method: ScrollPane>>defaultExtent (in category 'initialization') -----<br>
  defaultExtent<br>
+        ^150 px @ 120 px!<br>
-        ^150@120<br>
- !<br>
<br>
Item was changed:<br>
  ----- Method: ScrollPane>>scrollDeltaHeight (in category 'geometry') -----<br>
  scrollDeltaHeight<br>
         "Return the increment in pixels which this pane should be scrolled (normally a subclass responsibility)."<br>
+        ^ 10 px!<br>
-        ^ 10<br>
- !<br>
<br>
Item was changed:<br>
  ----- Method: ScrollPane>>scrollDeltaWidth (in category 'geometry') -----<br>
  scrollDeltaWidth<br>
         "Return the increment in pixels which this pane should be scrolled (normally a subclass responsibility)."<br>
+        ^ 10 px!<br>
-        <br>
-        ^10<br>
- !<br>
<br>
<br>
</div>
</span></font>
</body>
</html>