equal
deleted
inserted
replaced
24 #include <hbevent.h> |
24 #include <hbevent.h> |
25 #include <hbframedrawer.h> |
25 #include <hbframedrawer.h> |
26 #include <hbframeitem.h> |
26 #include <hbframeitem.h> |
27 #include <hbtapgesture.h> |
27 #include <hbtapgesture.h> |
28 #include <hbinstantfeedback.h> |
28 #include <hbinstantfeedback.h> |
|
29 #include <hbstringutil.h> |
29 #include "nmicons.h" |
30 #include "nmicons.h" |
30 #include "nmhswidgettitlerow.h" |
31 #include "nmhswidgettitlerow.h" |
31 #include "nmhswidgetconsts.h" |
32 #include "nmhswidgetconsts.h" |
32 #include "emailtrace.h" |
33 #include "emailtrace.h" |
33 |
34 |
232 NM_FUNCTION; |
233 NM_FUNCTION; |
233 mMailboxInfo->setPlainText(mAccountName); |
234 mMailboxInfo->setPlainText(mAccountName); |
234 //If unread count is -1, hide the unread count label completely. |
235 //If unread count is -1, hide the unread count label completely. |
235 //This indicates that there are no mails at all (or the initial sync is not done) |
236 //This indicates that there are no mails at all (or the initial sync is not done) |
236 if (mUnreadCount >= 0) { |
237 if (mUnreadCount >= 0) { |
237 QString unreadCount(hbTrId("txt_mail_widget_list_l1").arg(mUnreadCount)); |
238 QString unreadCount(HbStringUtil::convertDigits(hbTrId("txt_mail_widget_list_l1").arg(mUnreadCount))); |
238 mUnreadCountLabel->setPlainText(unreadCount); |
239 mUnreadCountLabel->setPlainText(unreadCount); |
239 QFontMetrics fm(mUnreadCountLabel->font()); |
240 QFontMetrics fm(mUnreadCountLabel->font()); |
240 qreal textWidth = fm.width(unreadCount); |
241 qreal textWidth = fm.width(unreadCount); |
241 mUnreadCountLabel->setMaximumWidth(textWidth); |
242 mUnreadCountLabel->setMaximumWidth(textWidth); |
242 } |
243 } |