Text Editor: use line-number color for margin

also use stipple so you can see the cursor behind it.
This commit is contained in:
Campbell Barton 2015-11-10 09:19:34 +11:00
parent 39497bbb48
commit ee761ebda9
1 changed files with 6 additions and 2 deletions

View File

@ -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);
}
}