[vlc-commits] Qt: EPGRuler: compute sizes based on widget's

Francois Cartegnie git at videolan.org
Sat Mar 9 20:30:41 CET 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Mar  9 16:59:23 2013 +0100| [035903fb004e6d8495275919dbf880440e4ff506] | committer: Francois Cartegnie

Qt: EPGRuler: compute sizes based on widget's

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

 modules/gui/qt4/components/epg/EPGRuler.cpp |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGRuler.cpp b/modules/gui/qt4/components/epg/EPGRuler.cpp
index ac898c1..afdbae8 100644
--- a/modules/gui/qt4/components/epg/EPGRuler.cpp
+++ b/modules/gui/qt4/components/epg/EPGRuler.cpp
@@ -36,8 +36,8 @@ EPGRuler::EPGRuler( QWidget* parent )
     : QWidget( parent )
 {
     setContentsMargins( 0, 0, 0, 0 );
-    setMinimumHeight( 30 );
-    setMaximumHeight( 30 );
+    setMinimumHeight( 15 );
+    setMaximumHeight( 15 );
     m_offset = 0;
 }
 
@@ -68,9 +68,8 @@ void EPGRuler::setOffset( int offset )
 void EPGRuler::paintEvent( QPaintEvent *event )
 {
     Q_UNUSED( event );
-
-    const QSize margin( 0, 15 );
-    const QSize header( 0, 15 );
+    const QSize margin( 0, contentsMargins().top() );
+    const QSize header( 0, maximumHeight() - contentsMargins().top() );
     const int spacing = m_scale * 3600;
     QPainter p( this );
 



More information about the vlc-commits mailing list