vista font rendering clip workaround
authorClaus Gittinger <cg@exept.de>
Thu, 15 Mar 2007 22:31:17 +0100
changeset 3470 dc4768fdada8
parent 3469 43f135642856
child 3471 24a5f40ff045
vista font rendering clip workaround
ListView.st
--- a/ListView.st	Tue Mar 13 18:19:27 2007 +0100
+++ b/ListView.st	Thu Mar 15 22:31:17 2007 +0100
@@ -1725,7 +1725,9 @@
 
         self fillRectangleX:x y:yf width:w height:fontHeight.
         self paint:fg.
-        self displayString:characterString x:x y:(y + fontAscent)
+        self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
+            self displayString:characterString x:x y:(y + fontAscent)
+        ]
     ]
 
     "Modified: / 15.12.1999 / 23:21:12 / cg"
@@ -1805,7 +1807,14 @@
                                   height:fontHeight.
                 ].
                 self paint:fg on:bg.
-                self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
+                w notNil ifTrue:[
+                    "/ clip req'd for VISTAs new font rendering (which seems to shoot over the compute        
+                    self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
+                        self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
+                    ]
+                ] ifFalse:[
+                    self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
+                ].
             ]
         ]
     ]
@@ -4507,5 +4516,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.315 2007-01-22 11:18:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.316 2007-03-15 21:31:17 cg Exp $'
 ! !