mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-19 23:41:51 +02:00
fix info icon with different DPIs
This commit is contained in:
parent
5738b4f75d
commit
b903dca9cf
@ -72,6 +72,9 @@ PlaylistItemDelegate::sizeHint( const QStyleOptionViewItem& option, const QModel
|
||||
{
|
||||
int rowHeight = option.fontMetrics.height() + 8;
|
||||
size.setHeight( rowHeight * 2 );
|
||||
} else if ( style == PlayableProxyModel::Detailed ) {
|
||||
int rowHeight = option.fontMetrics.height() * 1.4;
|
||||
size.setHeight( rowHeight );
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,7 +233,7 @@ PlaylistItemDelegate::paintDetailed( QPainter* painter, const QStyleOptionViewIt
|
||||
if ( m_view->hoveredIndex().row() == index.row() && m_view->hoveredIndex().column() == index.column() && !index.data().toString().isEmpty() &&
|
||||
( index.column() == PlayableModel::Artist || index.column() == PlayableModel::Album || index.column() == PlayableModel::Track ) )
|
||||
{
|
||||
opt.rect.setWidth( opt.rect.width() - 16 );
|
||||
opt.rect.setWidth( opt.rect.width() - opt.rect.height() - 2 );
|
||||
QRect arrowRect( opt.rect.x() + opt.rect.width(), opt.rect.y() + 1, opt.rect.height() - 2, opt.rect.height() - 2 );
|
||||
|
||||
QPixmap infoIcon = TomahawkUtils::defaultPixmap( TomahawkUtils::InfoIcon, TomahawkUtils::Original, arrowRect.size() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user