Commit 3cc5842b authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Appearance of LightDirectionWidget modified.

parent 5e2e6593
......@@ -13,9 +13,9 @@
void LightDirectionWidget::updateSphereImageContent()
{
QPalette palette = this->palette();
QColor dark = palette.windowText().color();
QColor light = palette.window().color();
QPalette palette = QApplication::palette();
QColor dark = palette.dark().color();
QColor light = palette.brightText().color();
for( int i=0, n=0; i<height(); ++i )
for( int j=0; j<width(); ++j, ++n )
......@@ -78,7 +78,14 @@ void LightDirectionWidget::paintEvent( QPaintEvent *evt )
{
QPainter painter;
painter.begin( this );
painter.drawImage( 0, 0, m_SphereImg );
if( isEnabled() )
painter.drawImage( 0, 0, m_SphereImg );
else
{
painter.setBrush( Qt::NoBrush );
painter.setPen( QPen(QApplication::palette().dark().color()) );
painter.drawEllipse( 0, 0, width()-1, height()-1 );
}
painter.end();
}
......
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