[squeak-dev] The Trunk: Morphic-ct.2027.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Tue Aug 23 11:07:21 UTC 2022


[cid:9b586a69-c6ba-441f-b73c-95ee2fc9372e]

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Dienstag, 23. August 2022 13:06:47
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Morphic-ct.2027.mcz

Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2027.mcz

==================== Summary ====================

Name: Morphic-ct.2027
Author: ct
Time: 23 August 2022, 1:06:20.364308 pm
UUID: d042a989-c812-3b4d-b00e-f50e4c387956
Ancestors: Morphic-mt.2025

Improves high-dpi support for SimpleButtonMorph and deduplicates #label:[font:].

=============== Diff against Morphic-mt.2025 ===============

Item was changed:
  ----- Method: SimpleButtonMorph>>label: (in category 'accessing') -----
  label: aString

+        ^ self label: aString font: nil!
-        | oldLabel m |
-        (oldLabel := self findA: StringMorph)
-                ifNotNil: [oldLabel delete].
-        m := StringMorph contents: aString font: TextStyle defaultFont.
-        self extent: m extent + (self borderWidth + 6).
-        m position: self center - (m extent // 2).
-        self addMorph: m.
-        m lock!

Item was changed:
  ----- Method: SimpleButtonMorph>>label:font: (in category 'accessing') -----
  label: aString font: aFont

         | oldLabel m |
         (oldLabel := self findA: StringMorph)
                 ifNotNil: [oldLabel delete].
+        m := StringMorph contents: aString font: (aFont ifNil: [TextStyle defaultFont]).
+        self extent: m extent + (self borderWidth + 6 px).
-        m := StringMorph contents: aString font: (aFont ifNil: [Preferences standardButtonFont]).
-        self extent: (m width + 6) @ (m height + 6).
         m position: self center - (m extent // 2).
         self addMorph: m.
+        m lock.!
-        m lock
- !


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220823/969e3fad/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 14829 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220823/969e3fad/attachment.png>


More information about the Squeak-dev mailing list