mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Use background gradients for HeaderWidgets.
This commit is contained in:
parent
4b6e4d836d
commit
4fdacf80a5
@ -49,12 +49,19 @@ StyleHelper::horizontalHeader( QPainter* painter, const QRect& r )
|
||||
{
|
||||
painter->save();
|
||||
|
||||
QRect upperHalf( 0, 0, r.width(), r.height() / 2 );
|
||||
/* QRect upperHalf( 0, 0, r.width(), r.height() / 2 );
|
||||
QRect lowerHalf( 0, upperHalf.height(), r.width(), r.height() );
|
||||
painter->fillRect( upperHalf, StyleHelper::headerUpperColor() );
|
||||
painter->fillRect( lowerHalf, StyleHelper::headerLowerColor() );
|
||||
painter->fillRect( lowerHalf, StyleHelper::headerLowerColor() );*/
|
||||
QLinearGradient gradient( QPoint( 0, 0 ), QPoint( 0, 1 ) );
|
||||
gradient.setCoordinateMode( QGradient::ObjectBoundingMode );
|
||||
gradient.setColorAt( 0.0, StyleHelper::headerLowerColor() );
|
||||
gradient.setColorAt( 1.0, StyleHelper::headerUpperColor() );
|
||||
|
||||
{
|
||||
painter->setBrush( gradient );
|
||||
painter->fillRect( r, gradient );
|
||||
|
||||
/* {
|
||||
QColor lineColor( 100, 100, 100 );
|
||||
QLine line( 0, 0, r.width(), 0 );
|
||||
painter->setPen( lineColor );
|
||||
@ -65,7 +72,7 @@ StyleHelper::horizontalHeader( QPainter* painter, const QRect& r )
|
||||
QLine line( 0, r.height() - 1, r.width(), r.height() - 1 );
|
||||
painter->setPen( lineColor );
|
||||
painter->drawLine( line );
|
||||
}
|
||||
}*/
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user