Tools__TextDiff3Tool.st
changeset 16603 5bfc8ece7e14
parent 15722 34b4f50c2083
child 16617 69e7de1ef22f
child 18768 cd6d15fb40b4
--- a/Tools__TextDiff3Tool.st	Mon May 16 09:49:08 2016 +0200
+++ b/Tools__TextDiff3Tool.st	Mon May 16 09:49:38 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2006 by eXept Software AG
               All Rights Reserved
@@ -1122,7 +1120,8 @@
 
 !TextDiff3Tool::MergeService methodsFor:'drawing'!
 
-drawLine:lineNo in:view atX:x y:y width:w height:h from:startCol to:endColOrNil with:fg and:bg 
+drawLine:lineNo in:view atX:x y:yBaseline width:w height:hFont ascent:aFont
+    from:startCol to:endColOrNil with:fg and:bg 
     "Called by both gutterView and textView (well, not yet) to
      allow services to draw custom things on text view.
      Ask JV what the args means if unsure (I'm lazy to document
@@ -1132,23 +1131,24 @@
 
     sectionInterval := self sectionInterval.
     view == gutterView ifFalse:[ ^ self ].
+    
     info := self infoAtLine: lineNo.
     info notNil ifTrue:[ 
         color := info color.
         color notNil ifTrue:[
-            view fillRectangleX: x y:y - h 
-                    width: 8 
-                    height:h + textView lineSpacing + 5"Magic constant to make it look nicer"
-                    color: color.
+            view fillRectangleX:x y:yBaseline - hFont 
+                 width:8 
+                 height:hFont + textView lineSpacing + 5"Magic constant to make it look nicer"
+                 color:color.
         ].
     ].
 
     (sectionInterval notNil and:[sectionInterval includes: lineNo]) ifTrue:[
-            "Drawing outside annotation area is not nice, but..."
-            view fillRectangleX:view width - 7 y:y - h 
-                width:4 
-                height:h + textView lineSpacing + 5"Magic constant to make it look nicer"
-                color: Color gray.
+        "Drawing outside annotation area is not nice, but..."
+        view fillRectangleX:view width - 7 y:yBaseline - hFont 
+             width:4 
+             height:hFont + textView lineSpacing + 5"Magic constant to make it look nicer"
+             color:(Color gray).
     ]
 
     "Created: / 19-03-2012 / 13:15:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"