mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-05-07 17:25:31 +02:00
Merge branch 'feature-update-icon' into develop
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>
|
||||
|
||||
BIN
app/SysTray-X/SysTray-X-app/files/icons/Thunderbird115.png
Normal file
BIN
app/SysTray-X/SysTray-X-app/files/icons/Thunderbird115.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
BIN
webext/icons/Thunderbird115.png
Normal file
BIN
webext/icons/Thunderbird115.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -124,8 +124,15 @@ async function getDefaultIcon() {
|
||||
);
|
||||
|
||||
// Convert image to storage param
|
||||
var defaultIconPath;
|
||||
if (SysTrayX.Info.browserInfo.majorVersion < 115) {
|
||||
defaultIconPath = "icons/Thunderbird.png";
|
||||
} else {
|
||||
defaultIconPath = "icons/Thunderbird115.png";
|
||||
}
|
||||
|
||||
const { defaultIconMimeUrl, defaultIconBase64Url } = await toDataURL(
|
||||
"icons/Thunderbird.png"
|
||||
defaultIconPath
|
||||
).then((dataUrl) => {
|
||||
const data = dataUrl.split(":").pop().split(",");
|
||||
return {
|
||||
|
||||
@@ -1182,6 +1182,13 @@ async function start() {
|
||||
document.getElementById("counttype").style.display = "none";
|
||||
}
|
||||
|
||||
// Set the right default icon
|
||||
if (SysTrayX.Info.browserInfo.majorVersion < 115) {
|
||||
document.getElementById("defaultCustomIconImage").setAttribute("src","icons/Thunderbird.png");
|
||||
} else {
|
||||
document.getElementById("defaultCustomIconImage").setAttribute("src","icons/Thunderbird115.png");
|
||||
}
|
||||
|
||||
if (SysTrayX.Info.platformInfo.os !== "linux") {
|
||||
document.getElementById("kdeintegration").style.display = "none";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user