Commit c0a8feb3 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: EPGChannels: drop the program number

parent 64369374
...@@ -52,10 +52,16 @@ void EPGChannels::paintEvent( QPaintEvent *event ) ...@@ -52,10 +52,16 @@ void EPGChannels::paintEvent( QPaintEvent *event )
for( int i = 0; i < channels.count(); ++i ) for( int i = 0; i < channels.count(); ++i )
{ {
QString text( channels[i] );
/* try to remove the " [Program xxx]" end */
int i_idx_channel = text.lastIndexOf(" [Program ");
if (i_idx_channel > 0)
text = text.left( i_idx_channel );
p.drawText( 0, - m_offset + ( i + 0.5 ) * TRACKS_HEIGHT - 4, p.drawText( 0, - m_offset + ( i + 0.5 ) * TRACKS_HEIGHT - 4,
width(), 20, Qt::AlignLeft, channels[i] ); width(), 20, Qt::AlignLeft, text );
int i_width = fontMetrics().width( channels[i] ); int i_width = fontMetrics().width( text );
if( width() < i_width ) if( width() < i_width )
setMinimumWidth( i_width ); setMinimumWidth( i_width );
} }
......
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