[Bf-blender-cvs] [ee761eb] master: Text Editor: use line-number color for margin

Campbell Barton noreply at git.blender.org
Mon Nov 9 23:26:29 CET 2015


Commit: ee761ebda95e00f99574a08df8b763401aba0070
Author: Campbell Barton
Date:   Tue Nov 10 09:19:34 2015 +1100
Branches: master
https://developer.blender.org/rBee761ebda95e00f99574a08df8b763401aba0070

Text Editor: use line-number color for margin

also use stipple so you can see the cursor behind it.

===================================================================

M	source/blender/editors/space_text/text_draw.c

===================================================================

diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 462b619..9bcaf04 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -47,6 +47,7 @@
 #include "ED_text.h"
 
 #include "BIF_gl.h"
+#include "BIF_glutil.h"
 
 #include "UI_interface.h"
 #include "UI_resources.h"
@@ -1433,15 +1434,18 @@ void draw_text_main(SpaceText *st, ARegion *ar)
 	}
 	
 	if (st->flags & ST_SHOW_MARGIN) {
-		UI_ThemeColor(TH_HILITE);
-
 		margin_column_x = x + st->cwidth * (st->margin_column - st->left);
 		
 		if (margin_column_x >= x) {
+			/* same color as line number background */
+			UI_ThemeColor(TH_GRID);
+
+			setlinestyle(1);
 			glBegin(GL_LINES);
 			glVertex2i(margin_column_x, 0);
 			glVertex2i(margin_column_x, ar->winy - 2);
 			glEnd();
+			setlinestyle(0);
 		}
 	}




More information about the Bf-blender-cvs mailing list