--- a/PopUpList.st Tue Feb 18 16:02:08 2014 +0100
+++ b/PopUpList.st Tue Feb 18 16:03:42 2014 +0100
@@ -805,8 +805,8 @@
].
showHandle ifTrue:[
- mmH := device horizontalPixelPerMillimeter.
- mmV := device verticalPixelPerMillimeter.
+ mmH := self graphicsDevice horizontalPixelPerMillimeter.
+ mmV := self graphicsDevice verticalPixelPerMillimeter.
mW := (mmH * 2.5) rounded.
mH := (mmV * 1.5) rounded.
@@ -863,7 +863,7 @@
theMenu isView ifTrue:[
"/ oldStyle - theMenu is a PopUpMenu / MenuPanel
- theMenu font:font.
+ theMenu font:gc font.
"
adjust the menus width to my current width
@@ -873,7 +873,7 @@
"
the popupMenu wants Display coordinates in its showAt: method
"
- org := device translatePoint:0@0 fromView:self toView:nil.
+ org := self graphicsDevice translatePoint:0@0 fromView:self toView:nil.
theMenu showAt:org "resizing:false"
] ifFalse:[
@@ -944,8 +944,8 @@
index := 1.
menu do:[:el | el value:#select:. el argument:index. index := index + 1. ].
menu receiver:self.
- menu font:font.
- menu preferredWidth:(self width).
+ menu font:gc font.
+ menu preferredWidth:self width.
"/ end of change
@@ -1008,7 +1008,7 @@
rawLabelSizeOf:aLogo
"compute the extent needed to hold the label plus the mark"
- |ext mmH mmV longest longestWidth labels|
+ |ext mmH mmV longest longestWidth labels currentDeviceFont|
ext := super rawLabelSizeOf:aLogo.
@@ -1017,19 +1017,19 @@
and:[adjust ~~ #center]]) ifTrue:[
"compute length of longest menu entry"
- font := font onDevice:device.
+ currentDeviceFont := gc createFontOnDevice.
longest := logo.
logo isNil ifTrue:[
longestWidth := 0
] ifFalse:[
- longestWidth := font widthOf:logo.
+ longestWidth := currentDeviceFont widthOf:logo.
].
labels := menu value labels.
labels notNil ifTrue:[
labels do:[:entry |
|this|
- this := font widthOf:entry printString.
+ this := currentDeviceFont widthOf:entry printString.
this > longestWidth ifTrue:[
longest := entry.
longestWidth := this
@@ -1040,8 +1040,8 @@
].
showHandle ifTrue:[
- mmH := device horizontalPixelPerMillimeter.
- mmV := device verticalPixelPerMillimeter.
+ mmH := self device horizontalPixelPerMillimeter.
+ mmV := self device verticalPixelPerMillimeter.
^ (ext x + hSpace + (mmH * 2.5) rounded + hSpace)
@
(ext y max: (mmV * 2) rounded)
@@ -1145,9 +1145,10 @@
!PopUpList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.82 2009-10-21 14:27:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.83 2014-02-18 15:03:42 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.82 2009-10-21 14:27:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.83 2014-02-18 15:03:42 stefan Exp $'
! !
+