Commit 888622d0 authored by Frédéric Larue's avatar Frédéric Larue

Major application appearance modifications.

parent 0c83e794
......@@ -295,7 +295,7 @@ bool GLViewer::addDisplayable( GenericUIData *m )
if( !m->GetDisplayOptions() )
{
UIParamSet *params = new UIParamSet( m->GetBaseName() + " display options:", NULL );
UIParamSet *params = new UIParamSet( m->GetBaseName() + " display options", NULL );
displayable->declareParameters( *params );
if( displayable->isAnimated() )
......
......@@ -45,14 +45,14 @@ void MetricGrid::displayGrid( GLViewer *viewer,
glEnd();
// display the lines corresponding to the colored axis.
glLineWidth( 2.0f );
glLineWidth( 1.5f );
glBegin( GL_LINES );
if( isAxisEnabled(X) )
{
glColor3ub( 255, 100, 100 );
glColor4ub( 255, 100, 100, 128 );
glVertex3d( -0.1*spacing2, 0, 0 );
glVertex3d( 0.1*spacing2, 0, 0 );
glColor4ub( 255, 100, 100, alpha );
glColor4ub( 255, 100, 100, alpha/2 );
glVertex3d( -spacing2, 0, 0 );
glVertex3d( -0.1*spacing2, 0, 0 );
glVertex3d( 0.1*spacing2, 0, 0 );
......@@ -60,10 +60,10 @@ void MetricGrid::displayGrid( GLViewer *viewer,
}
else if( isGridEnabled(XY) || isGridEnabled(ZX) )
{
glColor3ub( 220, 220, 220 );
glColor4ub( 220, 220, 220, 128 );
glVertex3d( -0.1*spacing2, 0, 0 );
glVertex3d( 0.1*spacing2, 0, 0 );
glColor4ub( 220, 220, 220, alpha );
glColor4ub( 220, 220, 220, alpha/2 );
glVertex3d( -spacing2, 0, 0 );
glVertex3d( -0.1*spacing2, 0, 0 );
glVertex3d( 0.1*spacing2, 0, 0 );
......@@ -71,10 +71,10 @@ void MetricGrid::displayGrid( GLViewer *viewer,
}
if( isAxisEnabled(Y) )
{
glColor3ub( 100, 255, 100 );
glColor4ub( 100, 255, 100, 128 );
glVertex3d( 0, -0.1*spacing2, 0 );
glVertex3d( 0, 0.1*spacing2, 0 );
glColor4ub( 100, 255, 100, alpha );
glColor4ub( 100, 255, 100, alpha/2 );
glVertex3d( 0, -spacing2, 0 );
glVertex3d( 0, -0.1*spacing2, 0 );
glVertex3d( 0, 0.1*spacing2, 0 );
......@@ -82,10 +82,10 @@ void MetricGrid::displayGrid( GLViewer *viewer,
}
else if( isGridEnabled(XY) || isGridEnabled(YZ) )
{
glColor3ub( 220, 220, 220 );
glColor4ub( 220, 220, 220, 128 );
glVertex3d( 0, -0.1*spacing2, 0 );
glVertex3d( 0, 0.1*spacing2, 0 );
glColor4ub( 220, 220, 220, alpha );
glColor4ub( 220, 220, 220, alpha/2 );
glVertex3d( 0, -spacing2, 0 );
glVertex3d( 0, -0.1*spacing2, 0 );
glVertex3d( 0, 0.1*spacing2, 0 );
......@@ -93,10 +93,10 @@ void MetricGrid::displayGrid( GLViewer *viewer,
}
if( isAxisEnabled(Z) )
{
glColor3ub( 100, 100, 255 );
glColor4ub( 100, 100, 255, 128 );
glVertex3d( 0, 0, -0.1*spacing2 );
glVertex3d( 0, 0, 0.1*spacing2 );
glColor4ub( 100, 100, 255, alpha );
glColor4ub( 100, 100, 255, alpha/2 );
glVertex3d( 0, 0, -spacing2 );
glVertex3d( 0, 0, -0.1*spacing2 );
glVertex3d( 0, 0, 0.1*spacing2 );
......@@ -104,10 +104,10 @@ void MetricGrid::displayGrid( GLViewer *viewer,
}
else if( isGridEnabled(YZ) || isGridEnabled(ZX) )
{
glColor3ub( 220, 220, 220 );
glColor4ub( 220, 220, 220, 128 );
glVertex3d( 0, 0, -0.1*spacing2 );
glVertex3d( 0, 0, 0.1*spacing2 );
glColor4ub( 220, 220, 220, alpha );
glColor4ub( 220, 220, 220, alpha/2 );
glVertex3d( 0, 0, -spacing2 );
glVertex3d( 0, 0, -0.1*spacing2 );
glVertex3d( 0, 0, 0.1*spacing2 );
......@@ -117,7 +117,7 @@ void MetricGrid::displayGrid( GLViewer *viewer,
// Display lines corresponding to the grid spacing.
glLineWidth( 1.0f );
glColor4ub( 220, 220, 220, alpha );
glColor4ub( 220, 220, 220, alpha/4 );
glBegin( GL_LINES );
if( isGridEnabled(XY) )
for( int i=1; i<=9; ++i )
......
......@@ -43,6 +43,76 @@ int UILaunch( int argc, char **argv )
QApplication::setAttribute( Qt::AA_ShareOpenGLContexts, true );
QApplication a( argc, argv );
QPalette palette = a.palette();
a.setStyleSheet(
"QPushButton {"
"color: rgb(160,192,255);"
"background-color: rgb(48,48,64);"
"}"
"QGroupBox {"
"color: rgb(200,230,255);"
"border: 2px solid rgb(200,230,255);"
"border-radius: 5px;"
"margin-top: 0.5em;"
"padding: 4 2 2 2;"
"}"
"QGroupBox::title {"
"subcontrol-origin: margin;"
"left: 20px;"
"padding: 0 2 0 3;"
"font:"
"}"
"QSpinBox {"
"color: rgb(200,230,255);"
"background-color: rgb(48,48,64);"
"border: 1px solid rgb(96,96,128);"
"border-radius: 3px;"
"}"
"QDoubleSpinBox {"
"color: rgb(200,230,255);"
"background-color: rgb(48,48,64);"
"border: 1px solid rgb(96,96,128);"
"border-radius: 3px;"
"}"
"QComboBox {"
"color: rgb(200,230,255);"
"background-color: rgb(48,48,64);"
"}"
"QLineEdit {"
"color: rgb(200,230,255);"
"background-color: rgb(48,48,64);"
"}"
);
for( int i=0; i<QPalette::NColorGroups; ++i )
{
palette.setColor( (QPalette::ColorGroup)i, QPalette::Window , QColor( 64, 64, 72 /*80*/) );
palette.setColor( (QPalette::ColorGroup)i, QPalette::WindowText , QColor(160,192,255) );//QColor(220,220,255) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::WindowText , QColor(255,192,0) );//QColor(220,220,255) );
palette.setColor( (QPalette::ColorGroup)i, QPalette::Text , QColor(160,192,255) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::ToolTipText, QColor(220,220,255) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::HighlightedText, QColor(220,220,255) );
palette.setColor( (QPalette::ColorGroup)i, QPalette::BrightText, QColor(220,220,255) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::Dark, QColor(220,220,255) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::Shadow, QColor(220,220,255) );
palette.setColor( (QPalette::ColorGroup)i, QPalette::Base , QColor( 48, 48, 64) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::ButtonText , QColor(220,220,255) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::Button , QColor( 48, 48, 64) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::Mid , QColor( 255, 48, 64) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::Dark , QColor( 0, 255, 64) );
//palette.setColor( (QPalette::ColorGroup)i, QPalette::Mid , QColor( 255, 48, 64) );
}
a.setPalette( palette );
UIMainWindow *mainWin = new UIMainWindowT(); // Use default GUI main window.
mainWin->onInitializingApp();
mainWin->init();
......
......@@ -22,9 +22,31 @@ UIParamChoice::UIParamChoice( const QString& id,
l->setSpacing( 0 );
if( name.isNull() || name.isEmpty() )
{
m_Widget = new QWidget();
l->setContentsMargins( 0, 0, 0, 0 );
}
else
{
m_Widget = new QGroupBox( name );
l->setContentsMargins( 4, 0, 4, 0 );
m_Widget->setStyleSheet(
"QGroupBox {"
"color: rgb(200,230,255);"
"border: 1px solid rgb(160,192,255);"
"border-radius: 5px;"
"margin-top: 0.5em;"
"padding: 4 2 2 2;"
"}"
"QGroupBox::title {"
"subcontrol-origin: margin;"
"left: 20px;"
"padding: 0 2 0 3;"
"font:"
"}"
);
}
m_Widget->setLayout( l );
unsigned int i = 0;
......
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