Fix gradient level in email_imap_alert segment

Closes #407
This commit is contained in:
ZyX 2013-04-08 07:49:44 +04:00
parent 340bdc7a51
commit b2cb5b1e94
1 changed files with 1 additions and 1 deletions

View File

@ -842,7 +842,7 @@ class EmailIMAPSegment(KwThreadedSegment):
return [{
'contents': str(unread_count),
'highlight_group': ['email_alert_gradient', 'email_alert'],
'gradient_level': unread_count * 100.0 / max_msgs,
'gradient_level': min(unread_count * 100.0 / max_msgs, 100),
}]