checkin from browser
authorClaus Gittinger <cg@exept.de>
Tue, 29 Jun 1999 21:05:39 +0200
changeset 1938 b4d7482c6c4b
parent 1937 b88111019826
child 1939 26f4418dcf9e
checkin from browser
ListView.st
--- a/ListView.st	Mon Jun 28 18:20:57 1999 +0200
+++ b/ListView.st	Tue Jun 29 21:05:39 1999 +0200
@@ -1338,56 +1338,76 @@
     |y yf x lineString len characterString w sCol eCol|
 
     (endCol >= startCol) ifTrue:[
-	sCol := startCol max:1.
-
-	lineString := self visibleAt:visLineNr.
-
-	(lineString notNil and:[lineString isString not])
-	ifTrue:[
-	    self drawVisibleLine:visLineNr with:fg and:bg.
-	] ifFalse:[
-	    x := (self xOfCol:sCol inVisibleLine:visLineNr) - leftOffset.
-	    y := (self yOfVisibleLine:visLineNr).
-	    yf := y - (lineSpacing // 2).
-	    len := lineString size.
-	    (sCol > len) ifTrue:[
-		len := endCol - sCol + 1.
-		backgroundAlreadyClearedColor == bg ifFalse:[
-		    self paint:bg.
-		    self fillRectangleX:x y:yf 
-				   width:(fontWidth * len) 
-				  height:fontHeight
-		]
-	    ] ifFalse:[
-		eCol := endCol.
-		(endCol > len) ifTrue:[
-		    backgroundAlreadyClearedColor == bg ifFalse:[
-			characterString := lineString species new:endCol.
-			characterString replaceFrom:1 to:len with:lineString startingAt:1.
-			lineString := characterString.
-		    ] ifTrue:[
-			eCol := len.
-		    ].
-		].
-		(lineString isMemberOf:String) ifTrue:[
-		    fontIsFixedWidth ifTrue:[
-			w := (eCol - sCol + 1) * fontWidth
-		    ] ifFalse:[
-			w := font widthOf:lineString from:sCol to:eCol
-		    ]
-		] ifFalse:[
-		    w := (lineString copyFrom:sCol to:eCol) widthOn:self
-		].
-		backgroundAlreadyClearedColor == bg ifFalse:[
-		    self paint:bg.
-		    self fillRectangleX:x y:yf 
-				  width:w
-				  height:fontHeight.
-		].
-		self paint:fg on:bg.
-		self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
-	    ]
-	]
+        sCol := startCol max:1.
+
+        lineString := self visibleAt:visLineNr.
+
+        (lineString notNil and:[lineString isString not])
+        ifTrue:[
+            self drawVisibleLine:visLineNr with:fg and:bg.
+        ] ifFalse:[
+            x := (self xOfCol:sCol inVisibleLine:visLineNr) - leftOffset.
+            y := (self yOfVisibleLine:visLineNr).
+            yf := y - (lineSpacing // 2).
+            len := lineString size.
+
+            (sCol > len) ifTrue:[
+                backgroundAlreadyClearedColor == bg ifFalse:[
+                    len := endCol - sCol + 1.
+                    self paint:bg.
+                    self fillRectangleX:x y:yf 
+                                   width:(fontWidth * len) 
+                                  height:fontHeight
+                ]
+            ] ifFalse:[
+                eCol := endCol.
+                (endCol > len) ifTrue:[
+                    backgroundAlreadyClearedColor == bg ifFalse:[
+                        characterString := lineString species new:endCol.
+                        characterString replaceFrom:1 to:len with:lineString startingAt:1.
+                        lineString := characterString.
+                    ] ifTrue:[
+                        eCol := len.
+                    ].
+                ].
+
+"/                "/ remove any color emphasis, to enforce drawing in fg/bg
+"/
+"/                (lineString notNil and:[lineString hasChangeOfEmphasis]) ifTrue:[
+"/                    lineString := lineString copyFrom:1 to:eCol.
+"/                    sCol to:eCol do:[:col |
+"/                        |em clr|
+"/
+"/                        em := (lineString emphasis) at:col.
+"/                        em notNil ifTrue:[
+"/                            clr := Text extractEmphasis:#color from:em.
+"/                            clr notNil ifTrue:[
+"/                                em := Text removeEmphasis:(#color->clr) from:em.
+"/                                lineString emphasisAt:col put:em
+"/                            ]
+"/                        ].
+"/                    ].
+"/                ].
+
+                backgroundAlreadyClearedColor == bg ifFalse:[
+                    (lineString isMemberOf:String) ifTrue:[
+                        fontIsFixedWidth ifTrue:[
+                            w := (eCol - sCol + 1) * fontWidth
+                        ] ifFalse:[
+                            w := font widthOf:lineString from:sCol to:eCol
+                        ]
+                    ] ifFalse:[
+                        w := (lineString copyFrom:sCol to:eCol) widthOn:self
+                    ].
+                    self paint:bg.
+                    self fillRectangleX:x y:yf 
+                                  width:w
+                                  height:fontHeight.
+                ].
+                self paint:fg on:bg.
+                self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
+            ]
+        ]
     ]
 
     "Modified: / 3.10.1998 / 22:59:41 / cg"
@@ -3884,5 +3904,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.199 1999-06-26 16:29:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.200 1999-06-29 19:05:39 cg Exp $'
 ! !