[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52991] trunk/blender/source/blender/ editors/space_text/text_draw.c: tweaks to text selection and highlight drawing.

Campbell Barton ideasman42 at gmail.com
Fri Dec 14 07:12:11 CET 2012


Revision: 52991
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52991
Author:   campbellbarton
Date:     2012-12-14 06:12:04 +0000 (Fri, 14 Dec 2012)
Log Message:
-----------
tweaks to text selection and highlight drawing.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_text/text_draw.c

Modified: trunk/blender/source/blender/editors/space_text/text_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_text/text_draw.c	2012-12-14 05:27:53 UTC (rev 52990)
+++ trunk/blender/source/blender/editors/space_text/text_draw.c	2012-12-14 06:12:04 UTC (rev 52991)
@@ -1399,9 +1399,9 @@
 		if (vcurl == vsell) {
 			y -= vcurl * lheight;
 			if (vcurc < vselc)
-				glRecti(x + vcurc * st->cwidth - 1, y, x + vselc * st->cwidth, y - lheight + TXT_LINE_SPACING);
+				glRecti(x + vcurc * st->cwidth - 1, y, x + vselc * st->cwidth, y - lheight);
 			else
-				glRecti(x + vselc * st->cwidth - 1, y, x + vcurc * st->cwidth, y - lheight + TXT_LINE_SPACING);
+				glRecti(x + vselc * st->cwidth - 1, y, x + vcurc * st->cwidth, y - lheight);
 		}
 		else {
 			int froml, fromc, tol, toc;
@@ -1420,7 +1420,7 @@
 			for (i = froml + 1; i < tol; i++)
 				glRecti(x - 4, y, ar->winx, y - lheight),  y -= lheight;
 
-			glRecti(x - 4, y, x + toc * st->cwidth, y - lheight + TXT_LINE_SPACING);  y -= lheight;
+			glRecti(x - 4, y, x + toc * st->cwidth, y - lheight);  y -= lheight;
 		}
 	}
 	else {
@@ -1445,11 +1445,11 @@
 			wrap_offset_in_line(st, ar, text->sell, text->selc, &offl, &offc);
 
 			y1 = ar->winy - 2 - (vsell - offl) * lheight;
-			y2 = y1 - lheight * visible_lines + 1;
+			y2 = y1 - (lheight * visible_lines + TXT_LINE_SPACING);
 		}
 		else {
 			y1 = ar->winy - 2 - vsell * lheight;
-			y2 = y1 - lheight + 1;
+			y2 = y1 - (lheight + TXT_LINE_SPACING);
 		}
 
 		if (!(y1 < 0 || y2 > ar->winy)) { /* check we need to draw */
@@ -1483,7 +1483,7 @@
 		}
 		else {
 			UI_ThemeColor(TH_HILITE);
-			glRecti(x - 1, y, x + 1, y - lheight + TXT_LINE_SPACING);
+			glRecti(x - 1, y, x + 1, y - lheight);
 		}
 	}
 }




More information about the Bf-blender-cvs mailing list