mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
fix font shrinking issue on OSX with the dragndrop menu
This commit is contained in:
@@ -178,24 +178,15 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
|||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
else if ( type == SourcesModel::StaticPlaylist || type == SourcesModel::CategoryAdd )
|
else if ( (type == SourcesModel::StaticPlaylist || type == SourcesModel::CategoryAdd )
|
||||||
|
&& m_expandedMap.contains( index ) && m_expandedMap.value( index )->partlyExpanded() && dropTypeCount( item ) > 0 )
|
||||||
{
|
{
|
||||||
|
// Let Qt paint the original item. We add our stuff after it
|
||||||
o.state &= QStyle::State_Selected;
|
o.state &= QStyle::State_Selected;
|
||||||
o.showDecorationSelected = false;
|
o.showDecorationSelected = false;
|
||||||
if ( !m_expandedMap.contains( index) )
|
|
||||||
{
|
|
||||||
QStyledItemDelegate::paint( painter, o, index );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Let Qt paint the original item. We add our stuff after it
|
|
||||||
// QStyleOptionViewItem o = option;
|
|
||||||
o.rect.adjust( 0, 0, 0, - option.rect.height() + m_expandedMap.value( index )->originalSize().height() );
|
o.rect.adjust( 0, 0, 0, - option.rect.height() + m_expandedMap.value( index )->originalSize().height() );
|
||||||
QStyledItemDelegate::paint( painter, o, index );
|
QStyledItemDelegate::paint( painter, o, index );
|
||||||
|
|
||||||
if ( !( m_expandedMap.value( index )->partlyExpanded() && dropTypeCount( item ) > 0 ) )
|
|
||||||
return;
|
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
// Get whole rect for the menu
|
// Get whole rect for the menu
|
||||||
|
Reference in New Issue
Block a user