mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-05-06 23:36:58 +02:00
Use the right default icon depending on the version
This commit is contained in:
@@ -29,5 +29,6 @@
|
||||
<file>languages/SysTray-X.zh-CN.qm</file>
|
||||
<file>languages/SysTray-X.zh-TW.qm</file>
|
||||
<file>files/icons/blank-icon-dark.png</file>
|
||||
<file>files/icons/Thunderbird115.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* Constructor
|
||||
*/
|
||||
SysTrayXIcon::SysTrayXIcon( SysTrayXLink* link, Preferences* pref, QObject* parent )
|
||||
: QSystemTrayIcon( QIcon( ":/files/icons/Thunderbird.png" ), parent )
|
||||
: QSystemTrayIcon( parent )
|
||||
{
|
||||
/*
|
||||
* Initialize
|
||||
@@ -343,7 +343,16 @@ void SysTrayXIcon::renderIcon()
|
||||
|
||||
case Preferences::PREF_TB_ICON:
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
QString version = m_pref->getBrowserVersion();
|
||||
|
||||
if( version.section( '.', 0, 0 ).toInt() < 115 )
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
}
|
||||
else
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird115.png" );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -354,7 +363,16 @@ void SysTrayXIcon::renderIcon()
|
||||
{
|
||||
case Preferences::PREF_DEFAULT_ICON_DEFAULT:
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
QString version = m_pref->getBrowserVersion();
|
||||
|
||||
if( version.section( '.', 0, 0 ).toInt() < 115 )
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
}
|
||||
else
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird115.png" );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,17 @@ SysTrayXStatusNotifier::SysTrayXStatusNotifier( SysTrayXLink* link, Preferences*
|
||||
*/
|
||||
setCategory( KStatusNotifierItem::ApplicationStatus );
|
||||
|
||||
setIconByPixmap( QIcon( QPixmap( ":/files/icons/Thunderbird.png") ) );
|
||||
QString version = m_pref->getBrowserVersion();
|
||||
|
||||
if( version.section( '.', 0, 0 ).toInt() < 115 )
|
||||
{
|
||||
setIconByPixmap( QIcon( QPixmap( ":/files/icons/Thunderbird.png") ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
setIconByPixmap( QIcon( QPixmap( ":/files/icons/Thunderbird115.png") ) );
|
||||
}
|
||||
|
||||
setTitle("SysTray-X");
|
||||
|
||||
setStatus( KStatusNotifierItem::ItemStatus::Passive );
|
||||
@@ -377,7 +387,16 @@ void SysTrayXStatusNotifier::renderIcon()
|
||||
|
||||
case Preferences::PREF_TB_ICON:
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
QString version = m_pref->getBrowserVersion();
|
||||
|
||||
if( version.section( '.', 0, 0 ).toInt() < 115 )
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
}
|
||||
else
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird115.png" );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -388,7 +407,16 @@ void SysTrayXStatusNotifier::renderIcon()
|
||||
{
|
||||
case Preferences::PREF_DEFAULT_ICON_DEFAULT:
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
QString version = m_pref->getBrowserVersion();
|
||||
|
||||
if( version.section( '.', 0, 0 ).toInt() < 115 )
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird.png" );
|
||||
}
|
||||
else
|
||||
{
|
||||
pixmap = QPixmap( ":/files/icons/Thunderbird115.png" );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user