Tools__TextDiff3Tool.st
branchjv
changeset 16617 69e7de1ef22f
parent 15950 23be8cf85415
parent 16603 5bfc8ece7e14
--- a/Tools__TextDiff3Tool.st	Mon May 16 06:49:42 2016 +0200
+++ b/Tools__TextDiff3Tool.st	Tue May 17 07:04:09 2016 +0200
@@ -1125,7 +1125,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
@@ -1135,23 +1136,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>"