layout->setContentsMargins(0,0,0,0);
layout->addSpacing( 3 );
- lbl = new QLabel( text );
+ lbl = new QVLCElidingLabel( text );
layout->addWidget(lbl, 1);
setLayout( layout );
- setMinimumHeight( 22 ); //Action icon height plus 6
+ int height = qMax( 22, fontMetrics().height() + 8 );
+ setMinimumHeight( height );
}
void PLSelItem::addAction( ItemAction act, const QString& tooltip )
PLSelItem *PLSelector::addPodcastItem( playlist_item_t *p_item )
{
- vlc_gc_incref( p_item->p_input );
- char *psz_name = input_item_GetName( p_item->p_input );
- PLSelItem *item = addItem(
- PL_ITEM_TYPE, qfu( psz_name ), false, podcastsParent );
- item->addAction( RM_ACTION, qtr( "Remove this podcast subscription" ) );
- item->treeItem()->setData( 0, PL_ITEM_ROLE, QVariant::fromValue( p_item ) );
- item->treeItem()->setData( 0, PL_ITEM_ID_ROLE, QVariant(p_item->i_id) );
- item->treeItem()->setData( 0, IN_ITEM_ROLE, QVariant::fromValue( p_item->p_input ) );
- CONNECT( item, action( PLSelItem* ), this, podcastRemove( PLSelItem* ) );
- free( psz_name );
- return item;
+ vlc_gc_incref( p_item->p_input );
+ char *psz_name = input_item_GetName( p_item->p_input );
+ PLSelItem *item = addItem(
+ PL_ITEM_TYPE, qfu( psz_name ), false, podcastsParent );
+ item->addAction( RM_ACTION, qtr( "Remove this podcast subscription" ) );
+ item->treeItem()->setData( 0, PL_ITEM_ROLE, QVariant::fromValue( p_item ) );
+ item->treeItem()->setData( 0, PL_ITEM_ID_ROLE, QVariant(p_item->i_id) );
+ item->treeItem()->setData( 0, IN_ITEM_ROLE, QVariant::fromValue( p_item->p_input ) );
+ CONNECT( item, action( PLSelItem* ), this, podcastRemove( PLSelItem* ) );
+ free( psz_name );
+ return item;
}
void PLSelector::createItems()