[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53677] trunk/blender/source/blender/ editors: reduce the alpha of console selection (text was too hard to read)

Campbell Barton ideasman42 at gmail.com
Wed Jan 9 11:18:06 CET 2013


Revision: 53677
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53677
Author:   campbellbarton
Date:     2013-01-09 10:18:05 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
reduce the alpha of console selection (text was too hard to read)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/include/BIF_glutil.h
    trunk/blender/source/blender/editors/screen/glutil.c
    trunk/blender/source/blender/editors/space_info/textview.c

Modified: trunk/blender/source/blender/editors/include/BIF_glutil.h
===================================================================
--- trunk/blender/source/blender/editors/include/BIF_glutil.h	2013-01-09 10:15:12 UTC (rev 53676)
+++ trunk/blender/source/blender/editors/include/BIF_glutil.h	2013-01-09 10:18:05 UTC (rev 53677)
@@ -51,10 +51,10 @@
 
 /* OpenGL stipple defines */
 /* OpenGL stipple defines */
-extern unsigned char stipple_halftone[128];
-extern unsigned char stipple_quarttone[128];
-extern unsigned char stipple_diag_stripes_pos[128];
-extern unsigned char stipple_diag_stripes_neg[128];
+extern const unsigned char stipple_halftone[128];
+extern const unsigned char stipple_quarttone[128];
+extern const unsigned char stipple_diag_stripes_pos[128];
+extern const unsigned char stipple_diag_stripes_neg[128];
 
 /**
  * Draw a lined (non-looping) arc with the given

Modified: trunk/blender/source/blender/editors/screen/glutil.c
===================================================================
--- trunk/blender/source/blender/editors/screen/glutil.c	2013-01-09 10:15:12 UTC (rev 53676)
+++ trunk/blender/source/blender/editors/screen/glutil.c	2013-01-09 10:18:05 UTC (rev 53677)
@@ -56,7 +56,7 @@
 /* ******************************************** */
 
 /* defined in BIF_gl.h */
-GLubyte stipple_halftone[128] = {
+const GLubyte stipple_halftone[128] = {
 	0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 
 	0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55, 
 	0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
@@ -83,7 +83,7 @@
  *     00000000 */
 
 
-GLubyte stipple_quarttone[128] = { 
+const GLubyte stipple_quarttone[128] = {
 	136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
 	136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
 	136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0,
@@ -94,7 +94,7 @@
 	136, 136, 136, 136, 0, 0, 0, 0, 34, 34, 34, 34, 0, 0, 0, 0};
 
 
-GLubyte stipple_diag_stripes_pos[128] = {
+const GLubyte stipple_diag_stripes_pos[128] = {
 	0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe,
 	0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8,
 	0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0,
@@ -113,7 +113,7 @@
 	0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f};
 
 
-GLubyte stipple_diag_stripes_neg[128] = {
+const GLubyte stipple_diag_stripes_neg[128] = {
 	0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01,
 	0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07,
 	0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f,

Modified: trunk/blender/source/blender/editors/space_info/textview.c
===================================================================
--- trunk/blender/source/blender/editors/space_info/textview.c	2013-01-09 10:15:12 UTC (rev 53676)
+++ trunk/blender/source/blender/editors/space_info/textview.c	2013-01-09 10:18:05 UTC (rev 53677)
@@ -71,14 +71,14 @@
 static void console_draw_sel(const int sel[2], const int xy[2], const int str_len_draw, int cwidth, int lheight)
 {
 	if (sel[0] <= str_len_draw && sel[1] >= 0) {
-		int sta = max_ii(sel[0], 0);
-		int end = min_ii(sel[1], str_len_draw);
+		const int sta = max_ii(sel[0], 0);
+		const int end = min_ii(sel[1], str_len_draw);
 
 		glEnable(GL_POLYGON_STIPPLE);
 		glPolygonStipple(stipple_halftone);
 		glEnable(GL_BLEND);
 		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-		glColor4ub(255, 255, 255, 96);
+		glColor4ub(255, 255, 255, 48);
 
 		glRecti(xy[0] + (cwidth * sta), xy[1] - 2 + lheight, xy[0] + (cwidth * end), xy[1] - 2);
 




More information about the Bf-blender-cvs mailing list