<div dir="ltr"><div>Yes, the fallback for StrikeFonts was not great here.</div><div>Not sure how to fix it</div><div><br></div><div>Best,</div><div>Karl</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 18, 2022 at 8:26 PM <<a href="mailto:christoph.thiede@student.hpi.uni-potsdam.de">christoph.thiede@student.hpi.uni-potsdam.de</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">Hi Karl,<br>
<br>
On 2022-12-14T15:54:17+00:00, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
> A new version of EToys was added to project The Inbox:<br>
> <a href="http://source.squeak.org/inbox/EToys-kfr.487.mcz" target="_blank">http://source.squeak.org/inbox/EToys-kfr.487.mcz</a><br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: EToys-kfr.487<br>
> Author: kfr<br>
> Time: 14 December 2022, 4:52:54.725958 pm<br>
> UUID: 9e4ab847-85fd-dc47-a79a-e6f6388e33e2<br>
> Ancestors: EToys-ct.486<br>
> <br>
> MineGame scale to HD Display<br>
> <br>
> =============== Diff against EToys-ct.486 ===============<br>
> <br>
> Item was changed:<br>
>   ----- Method: Mines>>defaultBorderWidth (in category 'initialization') -----<br>
>   defaultBorderWidth<br>
>       "answer the default border width for the receiver"<br>
> +     ^ 2 px!<br>
> -     ^ 2!<br>
> <br>
> Item was changed:<br>
>   ----- Method: Mines>>initialize (in category 'initialization') -----<br>
>   initialize<br>
>       "initialize the state of the receiver"<br>
>   <br>
>       super initialize.<br>
>       <br>
>         level := 1.<br>
>       self listDirection: #topToBottom;<br>
>         wrapCentering: #center;<br>
>            cellPositioning: #topCenter;<br>
>         vResizing: #shrinkWrap;<br>
>         hResizing: #shrinkWrap;<br>
> +       layoutInset: 3 px;<br>
> -       layoutInset: 3;<br>
>         addMorph: self makeControls;<br>
>         addMorph: self board.<br>
>       helpText := nil.<br>
>       <br>
>       self newGame!<br>
> <br>
> Item was changed:<br>
>   ----- Method: Mines>>makeControls (in category 'initialize') -----<br>
>   makeControls<br>
>       | row |<br>
>       row := AlignmentMorph newRow color: color;<br>
> +                  borderWidth: 2 px;<br>
> +                  layoutInset: 3 px.<br>
> -                  borderWidth: 2;<br>
> -                  layoutInset: 3.<br>
>       row borderStyle: BorderStyle inset.<br>
>       row hResizing: #spaceFill;<br>
>            vResizing: #shrinkWrap;<br>
>            wrapCentering: #center;<br>
>            cellPositioning: #leftCenter;<br>
> +          extent: 5 px @ 5 px.<br>
> -          extent: 5 @ 5.<br>
>       row<br>
>           addMorph: (self<br>
>                   buildButton: SimpleSwitchMorph new<br>
>                   target: self<br>
>                   label: '  Help  ' translated<br>
>                   selector: #help:).<br>
>       row<br>
>           addMorph: (self<br>
>                   buildButton: (levelButton := SimpleButtonMorph new)<br>
>                   target: self<br>
>                   label: level asString translated<br>
>                   selector: #nextLevel).<br>
>       row<br>
>           addMorph: (self<br>
>                   buildButton: SimpleButtonMorph new<br>
>                   target: self<br>
>                   label: '  Quit  ' translated<br>
>                   selector: #delete).<br>
>       "row <br>
>       addMorph: (self <br>
>       buildButton: SimpleButtonMorph new <br>
>       target: self <br>
>       label: ' Hint '  translated<br>
>       selector: #hint)."<br>
>       row<br>
>           addMorph: (self<br>
>                   buildButton: SimpleButtonMorph new<br>
>                   target: self<br>
>                   label: '  New game  ' translated<br>
>                   selector: #newGame).<br>
>       minesDisplay := LedMorph new digits: 2;<br>
> +                  extent: 2 * 10 px @ 15 px.<br>
> -                  extent: 2 * 10 @ 15.<br>
>       row<br>
>           addMorph: (self wrapPanel: minesDisplay label: 'Mines:' translated).<br>
> +     timeDisplay := LedTimerMorph new digits: 3;  extent: 3 * 10 px @ 15 px.<br>
> -     timeDisplay := LedTimerMorph new digits: 3;  extent: 3 * 10 @ 15.<br>
>       <br>
>       row<br>
>           addMorph: (self wrapPanel: timeDisplay label: 'Time:' translated).<br>
> +     hiScoreDisplay := LedMorph new digits: 3;  extent: 3 * 10 px@ 15 px.<br>
> -     hiScoreDisplay := LedMorph new digits: 3;  extent: 3 * 10 @ 15.<br>
>       row<br>
>           addMorph: (self wrapPanel: hiScoreDisplay label: 'Hi Score:' translated).<br>
>       ^ row!<br>
> <br>
> Item was changed:<br>
>   ----- Method: Mines>>wrapPanel:label: (in category 'initialize') -----<br>
>   wrapPanel: anLedPanel label: aLabel<br>
>       "wrap an LED panel in an alignmentMorph with a label to its left"<br>
>   <br>
>       | a |<br>
>       a := AlignmentMorph newRow<br>
>           wrapCentering: #center; cellPositioning: #leftCenter;<br>
>           hResizing: #shrinkWrap;<br>
>           vResizing: #shrinkWrap;<br>
>           borderWidth: 0;<br>
> +         layoutInset: 3 px;<br>
> -         layoutInset: 3;<br>
>           color: color lighter.<br>
>       a addMorph: anLedPanel.<br>
>       a addMorph: (StringMorph contents: aLabel). <br>
>       ^ a<br>
>   !<br>
> <br>
> Item was changed:<br>
>   ----- Method: MinesBoard>>defaultBorderWidth (in category 'initialization') -----<br>
>   defaultBorderWidth<br>
>       "answer the default border width for the receiver"<br>
> +     ^ 2 px!<br>
> -     ^ 2!<br>
> <br>
> Item was changed:<br>
>   ----- Method: MinesTile>>drawOn: (in category 'drawing') -----<br>
>   drawOn: aCanvas <br>
>       "Draw a rectangle with a solid, inset, or raised border.<br>
>       Note: the raised border color *and* the inset border color are generated<br>
>       from the receiver's own color, instead of having the inset border color<br>
>       generated from the owner's color, as in BorderedMorph."<br>
>   <br>
>       | font rct |<br>
>       super drawOn: aCanvas.<br>
>       <br>
>       self borderStyle style == #inset ifTrue: [<br>
>           self isMine ifTrue: [  <br>
> +             font  := StrikeFont familyName: 'Atlanta' size: 22 px emphasized: 1.<br>
> +             rct := self bounds insetBy: ((self bounds width) - (font widthOfString: '*'))/2 @0.<br>
> -             font  := StrikeFont familyName: 'Atlanta' size: 22 emphasized: 1.<br>
> -             rct := self bounds insetBy: ((self bounds width) - (font widthOfString: '*'))/2 at 0.<br>
>               rct := rct top: rct top + 1.<br>
>               aCanvas drawString: '*' in: (rct translateBy: 1 at 1) font: font color: Color black.<br>
>               ^ aCanvas drawString: '*' in: rct font: font color: Color red .].<br>
>           self nearMines > 0 ifTrue: [ <br>
> +             font := StrikeFont familyName: 'ComicBold' size: 22 px emphasized: 1.<br>
> +             rct := self bounds insetBy: ((self bounds width) - (font widthOfString: nearMines asString))/2 @0.<br>
> -             font := StrikeFont familyName: 'ComicBold' size: 22 emphasized: 1.<br>
> -             rct := self bounds insetBy: ((self bounds width) - (font widthOfString: nearMines asString))/2 at 0.<br>
>               rct := rct top: rct top + 1.<br>
>               aCanvas drawString: nearMines asString in: (rct translateBy: 1 at 1) font: font color: Color black.<br>
>               ^ aCanvas drawString: nearMines asString in: rct font: font color: ((palette at: nearMines) ) .]].!<br>
<br>
not sure whether the use of fontSize + #px is idiomatic. Maybe Marcel can help with that?<br>
<br>
Otherwise, LGTM. Thanks! :-)<br>
<br>
Best,<br>
Christoph<br>
<br>
> <br>
> Item was changed:<br>
>   ----- Method: MinesTile>>initialize (in category 'initialization') -----<br>
>   initialize<br>
>   <br>
>       super initialize.<br>
>       self label: ''.<br>
> +     self borderWidth: 3 px.<br>
> +     bounds := 0 at 0 corner: 20 px at 20 px.<br>
> -     self borderWidth: 3.<br>
> -     bounds := 0 at 0 corner: 20 at 20.<br>
>       offColor := self preferredColor.<br>
>       onColor := self preferredColor.<br>
>       switchState := false.<br>
>       oldSwitchState := false.<br>
>       disabled := false.<br>
>       isMine := false.<br>
>       nearMines := 0.<br>
>       self useSquareCorners.<br>
>       palette := (Color wheel: 8) asOrderedCollection reverse.<br>
>   "    flashColor := palette removeLast."<br>
>   !<br>
> <br>
> <br>
<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk" target="_blank"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
</blockquote></div>