Commit 8d17c211 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: EPGItem: fix gradient reference

parent c0a8feb3
...@@ -55,7 +55,6 @@ void EPGItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, ...@@ -55,7 +55,6 @@ void EPGItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
{ {
QPen pen; QPen pen;
QColor gradientColor; QColor gradientColor;
QLinearGradient gradient( m_boundingRect.topLeft(), m_boundingRect.bottomLeft() );
// Draw in view's coordinates // Draw in view's coordinates
painter->setWorldMatrixEnabled( false ); painter->setWorldMatrixEnabled( false );
...@@ -67,6 +66,8 @@ void EPGItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, ...@@ -67,6 +66,8 @@ void EPGItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
QTransform viewPortTransform = m_view->viewportTransform(); QTransform viewPortTransform = m_view->viewportTransform();
QRectF mapped = deviceTransform( viewPortTransform ).mapRect( boundingRect() ); QRectF mapped = deviceTransform( viewPortTransform ).mapRect( boundingRect() );
QLinearGradient gradient( mapped.topLeft(), mapped.bottomLeft() );
if ( m_current || m_simultaneous ) if ( m_current || m_simultaneous )
gradientColor.setRgb( 244, 125, 0 , m_simultaneous ? 192 : 255 ); gradientColor.setRgb( 244, 125, 0 , m_simultaneous ? 192 : 255 );
else else
......
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