Change color config types into actual colors now that I can do that

Mon, 31 Aug 2015 22:40:49 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Mon, 31 Aug 2015 22:40:49 +0300
changeset 973
c1b60c7d5135
parent 972
a34b73114823
child 974
b2fa5f89798a

Change color config types into actual colors now that I can do that

src/glRenderer.cpp file | annotate | diff | comparison | revisions
--- a/src/glRenderer.cpp	Mon Aug 31 21:38:58 2015 +0300
+++ b/src/glRenderer.cpp	Mon Aug 31 22:40:49 2015 +0300
@@ -51,8 +51,8 @@
 	{{  0, -1, 0 }, Z, Y, false,  true, true }, // right
 };
 
-ConfigOption (QString BackgroundColor = "#FFFFFF")
-ConfigOption (QString MainColor = "#A0A0A0")
+ConfigOption (QColor BackgroundColor = "#FFFFFF")
+ConfigOption (QColor MainColor = "#A0A0A0")
 ConfigOption (float MainColorAlpha = 1.0)
 ConfigOption (int LineThickness = 2)
 ConfigOption (bool BfcRedGreenView = false)
@@ -314,16 +314,15 @@
 		return;
 	}
 
-	QColor col (m_config->backgroundColor());
+	QColor color = m_config->backgroundColor();
 
-	if (not col.isValid())
+	if (not color.isValid())
 		return;
 
-	col.setAlpha (255);
-
-	m_darkbg = Luma (col) < 80;
-	m_bgcolor = col;
-	qglClearColor (col);
+	color.setAlpha (255);
+	m_darkbg = Luma (color) < 80;
+	m_bgcolor = color;
+	qglClearColor (color);
 }
 
 // =============================================================================

mercurial