diff options
Diffstat (limited to 'kmail/kmsystemtray.cpp')
-rw-r--r-- | kmail/kmsystemtray.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp index 7cb2fb432..dc5cd04fb 100644 --- a/kmail/kmsystemtray.cpp +++ b/kmail/kmsystemtray.cpp @@ -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(); |