[Bf-blender-cvs] [2d694dc] compositor-2016: GP Sculpt: Make the cursor more visible on light backgrounds

Joshua Leung noreply at git.blender.org
Wed Jun 8 21:48:41 CEST 2016


Commit: 2d694dcd13043fe9c28365a407835f9b634fc3b6
Author: Joshua Leung
Date:   Sat May 21 12:50:12 2016 +1200
Branches: compositor-2016
https://developer.blender.org/rB2d694dcd13043fe9c28365a407835f9b634fc3b6

GP Sculpt: Make the cursor more visible on light backgrounds

On light coloured backgrounds (especially on white), it was impossible to see
where the cursor was. This commit adds a second ring (black) to the cursor so
that on light backgrounds, even if the light ring isn't visible the black one
will be.

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

M	source/blender/editors/gpencil/gpencil_brush.c

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

diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index df05397..0271afd 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -866,14 +866,18 @@ static void gp_brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customda
 		
 		glTranslatef((float)x, (float)y, 0.0f);
 		
-		/* TODO: toggle between add and remove? */
-		glColor4ub(255, 255, 255, 128);
-		
 		glEnable(GL_LINE_SMOOTH);
 		glEnable(GL_BLEND);
 		
+		/* Inner Ring: Light color for action of the brush */
+		/* TODO: toggle between add and remove? */
+		glColor4ub(255, 255, 255, 200);
 		glutil_draw_lined_arc(0.0, M_PI * 2.0, brush->size, 40);
 		
+		/* Outer Ring: Dark color for contrast on light backgrounds (e.g. gray on white) */
+		glColor3ub(30, 30, 30);
+		glutil_draw_lined_arc(0.0, M_PI * 2.0, brush->size + 1, 40);
+		
 		glDisable(GL_BLEND);
 		glDisable(GL_LINE_SMOOTH);




More information about the Bf-blender-cvs mailing list