[Bf-blender-cvs] [28a8dbb] wiggly-widgets: Minor tweaks to 3D widget colors

Julian Eisel noreply at git.blender.org
Sun Aug 16 22:18:01 CEST 2015


Commit: 28a8dbba51f50f13a8d118baf18586301d23259a
Author: Julian Eisel
Date:   Sun Aug 16 22:17:23 2015 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB28a8dbba51f50f13a8d118baf18586301d23259a

Minor tweaks to 3D widget colors

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

M	source/blender/editors/transform/manipulator_widget.c
M	source/blender/windowmanager/intern/wm_generic_widgets.c

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

diff --git a/source/blender/editors/transform/manipulator_widget.c b/source/blender/editors/transform/manipulator_widget.c
index b27b03c..2b53251 100644
--- a/source/blender/editors/transform/manipulator_widget.c
+++ b/source/blender/editors/transform/manipulator_widget.c
@@ -1981,9 +1981,9 @@ static ManipulatorGroup *manipulator_widgetgroup_create(struct wmWidgetGroup *wg
 	ManipulatorGroup *manipulator = MEM_callocN(sizeof(ManipulatorGroup), "manipulator_data");
 	wmWidget *axis;
 
-	float color_green[4] = {0.25f, 1.0f, 0.25f, 1.0f};
-	float color_red[4] = {1.0f, 0.25f, 0.25f, 1.0f};
-	float color_blue[4] = {0.25f, 0.25f, 1.0f, 1.0f};
+	float color_green[4] = {0.27f, 1.0f, 0.27f, 1.0f};
+	float color_red[4] = {1.0f, 0.27f, 0.27f, 1.0f};
+	float color_blue[4] = {0.27f, 0.27f, 1.0f, 1.0f};
 	short i;
 
 	manipulator->translate_x = WIDGET_arrow_new(wgroup, "translate_x", WIDGET_ARROW_STYLE_NORMAL);
diff --git a/source/blender/windowmanager/intern/wm_generic_widgets.c b/source/blender/windowmanager/intern/wm_generic_widgets.c
index 5402dcf..293776c 100644
--- a/source/blender/windowmanager/intern/wm_generic_widgets.c
+++ b/source/blender/windowmanager/intern/wm_generic_widgets.c
@@ -72,6 +72,8 @@
  *            GENERIC WIDGET LIBRARY                  *
  ******************************************************/
 
+float highlight_col[] = {1.0f, 1.0f, 0.45f, 1.0f};
+
 typedef struct WidgetDrawInfo {
 	int nverts;
 	int ntris;
@@ -213,10 +215,12 @@ static void arrow_draw_intern(ArrowWidget *arrow, bool select, bool highlight)
 	glPushMatrix();
 	glMultMatrixf(&mat[0][0]);
 
-	if (highlight && !(arrow->widget.flag & WM_WIDGET_DRAW_HOVER))
-		glColor4f(1.0, 1.0, 0.0, 1.0);
-	else
+	if (highlight && !(arrow->widget.flag & WM_WIDGET_DRAW_HOVER)) {
+		glColor4fv(highlight_col);
+	}
+	else {
 		glColor4fv(arrow->color);
+	}
 
 	arrow_draw_geom(arrow, select);
 
@@ -511,7 +515,7 @@ static void dial_draw_intern(DialWidget *dial, bool select, bool highlight, floa
 	glMultMatrixf(&mat[0][0]);
 
 	if (highlight)
-		glColor4f(1.0, 1.0, 0.0, 1.0);
+		glColor4fv(highlight_col);
 	else
 		glColor4fv(dial->color);




More information about the Bf-blender-cvs mailing list