tuned rendering -- avoid overlap with squiggly underline;
authorwenzelm
Sun, 13 Apr 2014 19:18:30 +0200
changeset 56560 ac916ea744e4
parent 56559 eece73c31e38
child 56561 5b6c3d69942a
tuned rendering -- avoid overlap with squiggly underline;
src/Tools/jEdit/src/rich_text_area.scala
--- a/src/Tools/jEdit/src/rich_text_area.scala	Sun Apr 13 16:42:44 2014 +0200
+++ b/src/Tools/jEdit/src/rich_text_area.scala	Sun Apr 13 19:18:30 2014 +0200
@@ -317,7 +317,7 @@
               }
             }
 
-            // spell-checker
+            // spell checker
             for {
               spell_checker <- PIDE.spell_checker.get
               range0 <- rendering.spell_checker_ranges(line_range)
@@ -326,7 +326,7 @@
               r <- JEdit_Lib.gfx_range(text_area, range + range0.start)
             } {
               gfx.setColor(rendering.spell_checker_color)
-              val y0 = r.y + fm.getAscent + 2
+              val y0 = r.y + ((fm.getAscent + 4) min (line_height - 2))
               gfx.drawLine(r.x, y0, r.x + r.length, y0)
             }
           }