Commit 035903fb authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: EPGRuler: compute sizes based on widget's

parent 726e595b
...@@ -36,8 +36,8 @@ EPGRuler::EPGRuler( QWidget* parent ) ...@@ -36,8 +36,8 @@ EPGRuler::EPGRuler( QWidget* parent )
: QWidget( parent ) : QWidget( parent )
{ {
setContentsMargins( 0, 0, 0, 0 ); setContentsMargins( 0, 0, 0, 0 );
setMinimumHeight( 30 ); setMinimumHeight( 15 );
setMaximumHeight( 30 ); setMaximumHeight( 15 );
m_offset = 0; m_offset = 0;
} }
...@@ -68,9 +68,8 @@ void EPGRuler::setOffset( int offset ) ...@@ -68,9 +68,8 @@ void EPGRuler::setOffset( int offset )
void EPGRuler::paintEvent( QPaintEvent *event ) void EPGRuler::paintEvent( QPaintEvent *event )
{ {
Q_UNUSED( event ); Q_UNUSED( event );
const QSize margin( 0, contentsMargins().top() );
const QSize margin( 0, 15 ); const QSize header( 0, maximumHeight() - contentsMargins().top() );
const QSize header( 0, 15 );
const int spacing = m_scale * 3600; const int spacing = m_scale * 3600;
QPainter p( this ); QPainter p( this );
......
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