Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon on newly-made aliases is monotone #528

Closed
vadi2 opened this issue Mar 31, 2017 · 3 comments
Closed

Icon on newly-made aliases is monotone #528

vadi2 opened this issue Mar 31, 2017 · 3 comments
Labels

Comments

@vadi2
Copy link
Member

vadi2 commented Mar 31, 2017

When you create and hit 'Save' button on the alias that was just made, the icon that appears besides is monochrome - when the alias is enabled. Clicking on it causes it to go technicolor properly.

Launchpad Details: #LP1095946 Vadim Peretokin - 2013-01-04 06:15:05 +0000

@vadi2 vadi2 added the low label Mar 31, 2017
@vadi2
Copy link
Member Author

vadi2 commented Mar 31, 2017

This is caused by a missing else in dlgTriggerEditor::saveAlias() (in around line 3639 of dlgTriggerEditor.cpp) which means that the grey (disabled by ancestor) icon is used. It is fixed in code put forward my me and currently being checked over by Ahmed Charles in his GH repository, branch "icons".

In essence the patch would be as follows, though there are other proposed changes that would clash:

         if( pT->state() )
         {
             if( old_name == "New Alias" )//|| old_name == "New Alias Group" )
             {
                 QIcon _icon;
                 if( pT->isFolder() )
                 {
                     if( pT->ancestorsActive() )
                         _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/folder-violet.png" ) ), QIcon::Normal, QIcon::Off );
                     else
                         _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/folder-grey.png" ) ), QIcon::Normal, QIcon::Off );
                 }
                 else
                 {
                     if( pT->ancestorsActive() )
                        _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/tag_checkbox_checked.png" ) ), QIcon::Normal, QIcon::Off );
  •                    else
    
  •                        _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/tag_checkbox_checked_grey.png" ) ), QIcon::Normal, QIcon::Off
    
  •                    _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/tag_checkbox_checked_grey.png" ) ), QIcon::Normal, QIcon::Off );
    

);
}
pItem->setIcon( 0, _icon );
pItem->setText( 0, name );
pT->setIsActive( true );
}
else
{
pItem->setIcon( 0, icon);
pItem->setText( 0, name );
}
}
else
{
QIcon iconError;
iconError.addPixmap( QPixmap( QStringLiteral( ":/icons/tools-report-bug.png" ) ), QIcon::Normal, QIcon::Off );
pItem->setIcon( 0, iconError );
pItem->setText( 0, name );
}

Launchpad Details: #LPC Stephen Lyons - 2014-08-20 22:18:59 +0000

@vadi2
Copy link
Member Author

vadi2 commented Mar 31, 2017

Bother, didn't wrap/paste correctly. 8-(

Launchpad Details: #LPC Stephen Lyons - 2014-08-20 22:20:32 +0000

@vadi2
Copy link
Member Author

vadi2 commented Sep 27, 2017

Fixed now thanks to @SlySven's work.

@vadi2 vadi2 closed this as completed Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant