Navigation Menu

Skip to content

Commit

Permalink
[Plugin manager][needs-docs] Deprecated plugins are listed gray. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Sep 14, 2018
1 parent 8b07b4e commit 05c9e01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/pluginmanager/qgspluginitemdelegate.cpp
Expand Up @@ -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() );
Expand Down
1 change: 1 addition & 0 deletions src/app/pluginmanager/qgspluginmanager.cpp
Expand Up @@ -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() )
{
Expand Down
1 change: 1 addition & 0 deletions src/app/pluginmanager/qgspluginsortfilterproxymodel.h
Expand Up @@ -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


Expand Down

0 comments on commit 05c9e01

Please sign in to comment.