- ported over the selected color blend from master

Mon, 10 Mar 2014 01:02:51 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Mon, 10 Mar 2014 01:02:51 +0200
changeset 695
4ace632e247b
parent 694
3868f52da6b9
child 696
35d2c1979d79

- ported over the selected color blend from master

src/GLCompiler.cc file | annotate | diff | comparison | revisions
src/GLRenderer.cc file | annotate | diff | comparison | revisions
--- a/src/GLCompiler.cc	Mon Mar 10 00:53:39 2014 +0200
+++ b/src/GLCompiler.cc	Mon Mar 10 01:02:51 2014 +0200
@@ -9,6 +9,8 @@
 #include "GLRenderer.h"
 #include "Dialogs.h"
 
+cfg (String,	gl_selectcolor,			"#0080FF")
+
 struct GLErrorInfo
 {
 	GLenum	value;
@@ -165,12 +167,11 @@
 
 	if (topobj->isSelected())
 	{
-		// Brighten it up if selected.
-		const int add = 51;
-
-		qcol.setRed (min (qcol.red() + add, 255));
-		qcol.setGreen (min (qcol.green() + add, 255));
-		qcol.setBlue (min (qcol.blue() + add, 255));
+		// Brighten it up for the select list.
+		QColor selcolor (gl_selectcolor);
+		qcol.setRed ((qcol.red() + selcolor.red()) / 2);
+		qcol.setGreen ((qcol.green() + selcolor.green()) / 2);
+		qcol.setBlue ((qcol.blue() + selcolor.blue()) / 2);
 	}
 
 	return qcol;
--- a/src/GLRenderer.cc	Mon Mar 10 00:53:39 2014 +0200
+++ b/src/GLRenderer.cc	Mon Mar 10 01:02:51 2014 +0200
@@ -64,7 +64,6 @@
 cfg (String,	gl_bgcolor,				"#FFFFFF")
 cfg (String,	gl_maincolor,			"#A0A0A0")
 cfg (Float,		gl_maincolor_alpha,		1.0)
-cfg (String,	gl_selectcolor,			"#0080FF")
 cfg (Int,		gl_linethickness,		2)
 cfg (Bool,		gl_colorbfc,			false)
 cfg (Int,		gl_camera,				GLRenderer::EFreeCamera)

mercurial