|
|
|
@ -133,7 +133,6 @@ void KMSystemTray::buildPopupMenu()
|
|
|
|
|
action->plug( mPopupMenu );
|
|
|
|
|
mPopupMenu->insertSeparator();
|
|
|
|
|
|
|
|
|
|
TDEMainWindow *mainWin = ::tqqt_cast<TDEMainWindow*>(kmkernel->getKMMainWidget()->topLevelWidget());
|
|
|
|
|
mPopupMenu->insertItem( SmallIcon("exit"), i18n("&Quit"), this, TQT_SLOT(maybeQuit()) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -180,6 +179,11 @@ int KMSystemTray::mode() const
|
|
|
|
|
return mMode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KMSystemTray::resizeEvent(TQResizeEvent *)
|
|
|
|
|
{
|
|
|
|
|
updateCount();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update the count of unread messages. If there are unread messages,
|
|
|
|
|
* overlay the count on top of a transparent version of the KMail icon.
|
|
|
|
@ -196,6 +200,14 @@ void KMSystemTray::updateCount()
|
|
|
|
|
TQFont countFont = TDEGlobalSettings::generalFont();
|
|
|
|
|
countFont.setBold(true);
|
|
|
|
|
|
|
|
|
|
// increase the size of the font for the number of unread messages if the
|
|
|
|
|
// icon size is less than 22 pixels
|
|
|
|
|
// see bug 1251
|
|
|
|
|
int realIconHeight = height();
|
|
|
|
|
if (realIconHeight < 22) {
|
|
|
|
|
countFont.setPointSizeFloat( countFont.pointSizeFloat() * 2.0 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// decrease the size of the font for the number of unread messages if the
|
|
|
|
|
// number doesn't fit into the available space
|
|
|
|
|
float countFontSize = countFont.pointSizeFloat();
|
|
|
|
|