Commit 84f707dd authored by Frédéric Larue's avatar Frédéric Larue
Browse files

GLViewer background gradient colors depend on the application palette.

parent 2d72e364
...@@ -874,15 +874,19 @@ void GLViewer::paintGL() ...@@ -874,15 +874,19 @@ void GLViewer::paintGL()
glDisable( GL_DEPTH_TEST ); glDisable( GL_DEPTH_TEST );
glDepthMask( GL_FALSE ); glDepthMask( GL_FALSE );
QColor dark = palette().color( QPalette::Dark );
QColor light = palette().color( QPalette::Light );
glBegin( GL_QUADS ); glBegin( GL_QUADS );
//glColor3ub( 132, 132, 132 ); //glColor3ub( 132, 132, 132 );
//glColor3ub( 58, 58, 58 ); //glColor3ub( 58, 58, 58 );
glColor3ub( 42, 42, 42 ); //glColor3ub( 42, 42, 42 );
glColor3ub( dark.red(), dark.green(), dark.blue() );
glVertex2i( -1, -1 ); glVertex2i( -1, -1 );
glVertex2i( 1, -1 ); glVertex2i( 1, -1 );
//glColor3ub( 208, 208, 208 ); //glColor3ub( 208, 208, 208 );
//glColor3ub( 134, 134, 134 ); //glColor3ub( 134, 134, 134 );
glColor3ub( 118, 118, 118 ); //glColor3ub( 118, 118, 118 );
glColor3ub( light.red(), light.green(), light.blue() );
glVertex2i( 1, 1 ); glVertex2i( 1, 1 );
glVertex2i( -1, 1 ); glVertex2i( -1, 1 );
glEnd(); glEnd();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment