summaryrefslogtreecommitdiffstats
path: root/kmail
diff options
context:
space:
mode:
Diffstat (limited to 'kmail')
-rw-r--r--kmail/kmsystemtray.cpp14
-rw-r--r--kmail/kmsystemtray.h1
2 files changed, 14 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();
diff --git a/kmail/kmsystemtray.h b/kmail/kmsystemtray.h
index c63fdd1df..b689def57 100644
--- a/kmail/kmsystemtray.h
+++ b/kmail/kmsystemtray.h
@@ -69,6 +69,7 @@ protected:
void showKMail();
void buildPopupMenu();
void updateCount();
+ void resizeEvent(TQResizeEvent *);
TQString prettyName(KMFolder *);