[vlc-commits] Qt: EPGItem: fix gradient reference

Francois Cartegnie git at videolan.org
Sat Mar 5 16:25:48 CET 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Mar  5 15:38:14 2011 +0100| [8d17c2116d80f3e80ed343cfc03428b17f3e2504] | committer: Francois Cartegnie

Qt: EPGItem: fix gradient reference

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d17c2116d80f3e80ed343cfc03428b17f3e2504
---

 modules/gui/qt4/components/epg/EPGItem.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGItem.cpp b/modules/gui/qt4/components/epg/EPGItem.cpp
index 62b0366..8d8ca4b 100644
--- a/modules/gui/qt4/components/epg/EPGItem.cpp
+++ b/modules/gui/qt4/components/epg/EPGItem.cpp
@@ -55,7 +55,6 @@ void EPGItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
 {
     QPen pen;
     QColor gradientColor;
-    QLinearGradient gradient( m_boundingRect.topLeft(), m_boundingRect.bottomLeft() );
 
     // Draw in view's coordinates
     painter->setWorldMatrixEnabled( false );
@@ -67,6 +66,8 @@ void EPGItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
     QTransform viewPortTransform = m_view->viewportTransform();
     QRectF mapped = deviceTransform( viewPortTransform ).mapRect( boundingRect() );
 
+    QLinearGradient gradient( mapped.topLeft(), mapped.bottomLeft() );
+
     if ( m_current || m_simultaneous )
         gradientColor.setRgb( 244, 125, 0 , m_simultaneous ? 192 : 255 );
     else



More information about the vlc-commits mailing list