Skip to content
Permalink
Browse files

[Plugin manager][needs-docs] Deprecated plugins are listed gray. Fixes

  • Loading branch information
borysiasty committed Sep 14, 2018
1 parent 8b07b4e commit 05c9e0180e65e2505414249ad0f15797ff97e0a3
@@ -77,6 +77,10 @@ void QgsPluginItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem
{
painter->setPen( option.palette.highlightedText().color() );
}
else if ( index.data( PLUGIN_ISDEPRECATED_ROLE ).toString() == QLatin1String( "true" ) )
{
painter->setPen( option.palette.color( QPalette::Disabled, QPalette::Text ) );
}
else
{
painter->setPen( option.palette.text().color() );
@@ -539,6 +539,7 @@ void QgsPluginManager::reloadModelData()
mypDetailItem->setData( it->value( QStringLiteral( "downloads" ) ).rightJustified( 10, '0' ), PLUGIN_DOWNLOADS_ROLE );
mypDetailItem->setData( it->value( QStringLiteral( "zip_repository" ) ), PLUGIN_REPOSITORY_ROLE );
mypDetailItem->setData( it->value( QStringLiteral( "average_vote" ) ), PLUGIN_VOTE_ROLE );
mypDetailItem->setData( it->value( QStringLiteral( "deprecated" ) ), PLUGIN_ISDEPRECATED_ROLE );

if ( QFileInfo( iconPath ).isFile() )
{
@@ -30,6 +30,7 @@ const int PLUGIN_STATUS_ROLE = Qt::UserRole + 6; // for filtering and sort
const int PLUGIN_DOWNLOADS_ROLE = Qt::UserRole + 7; // for sorting
const int PLUGIN_VOTE_ROLE = Qt::UserRole + 8; // for sorting
const int PLUGIN_REPOSITORY_ROLE = Qt::UserRole + 9; // for sorting
const int PLUGIN_ISDEPRECATED_ROLE = Qt::UserRole + 10; // for styling
const int SPACER_ROLE = Qt::UserRole + 20; // for sorting


0 comments on commit 05c9e01

Please sign in to comment.
You can’t perform that action at this time.