Add themed icon

This commit is contained in:
Ximi1970
2020-01-24 23:41:56 +01:00
parent 4392b1fcc9
commit a862ce8767
2 changed files with 11 additions and 1 deletions

View File

@@ -25,3 +25,7 @@ Tree table
https://stackoverflow.com/questions/5636375/how-to-create-a-collapsing-tree-table-in-html-css-js
http://maxdesign.com.au/articles/tree-table/
Image to Base64 conversion
https://stackoverflow.com/questions/6150289/how-to-convert-image-into-base64-string-using-javascript

View File

@@ -116,12 +116,18 @@ void SysTrayXIcon::renderIcon()
switch( m_icon_type )
{
case Preferences::PREF_BLANK_ICON:
case Preferences::PREF_NEWMAIL_ICON:
{
pixmap = QPixmap( ":/files/icons/blank-icon.png" );
break;
}
case Preferences::PREF_NEWMAIL_ICON:
{
QIcon new_mail = QIcon::fromTheme("mail-unread", QIcon(":/files/icons/blank-icon.png"));
pixmap = QPixmap( new_mail.pixmap( 256, 256 ) );
break;
}
case Preferences::PREF_CUSTOM_ICON:
{
pixmap.loadFromData( m_icon_data );