#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Tue, 09 Aug 2016 12:42:21 +0200
changeset 5819 ef8ff5a9d801
parent 5818 303a3073eb68
child 5820 7dafda8e0ce8
#REFACTORING by stefan class: PopUpList changed: #rawLabelSizeOf: use #deviceFont instead of #createFontOnDevice
PopUpList.st
--- a/PopUpList.st	Tue Aug 09 12:41:15 2016 +0200
+++ b/PopUpList.st	Tue Aug 09 12:42:21 2016 +0200
@@ -1010,7 +1010,7 @@
 rawLabelSizeOf:aLogo
     "compute the extent needed to hold the label plus the mark"
 
-    |ext mmH mmV longest longestWidth labels currentDeviceFont|
+    |ext mmH mmV longest longestWidth labels deviceFont|
 
     ext := super rawLabelSizeOf:aLogo.
 
@@ -1019,19 +1019,19 @@
     and:[adjust ~~ #center]]) ifTrue:[
         "compute length of longest menu entry"
 
-        currentDeviceFont := gc createFontOnDevice.
+        deviceFont := gc deviceFont.
         longest := logo.
         logo isNil ifTrue:[
             longestWidth := 0
         ] ifFalse:[
-            longestWidth := currentDeviceFont widthOf:logo.
+            longestWidth := deviceFont widthOf:logo.
         ].
         labels := menu value labels.
         labels notNil ifTrue:[
             labels do:[:entry |
                 |this|
 
-                this := currentDeviceFont widthOf:entry printString.
+                this := deviceFont widthOf:entry printString.
                 this > longestWidth ifTrue:[
                     longest := entry.
                     longestWidth := this