| Index: ui/message_center/views/notification_view.cc
|
| diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
|
| index 10573eddc8382bc63da327d72fa731f8073bd990..8157e181c92fdecf6f16e462d5de378a2ad5e127 100644
|
| --- a/ui/message_center/views/notification_view.cc
|
| +++ b/ui/message_center/views/notification_view.cc
|
| @@ -323,11 +323,15 @@ NotificationView::NotificationView(MessageCenterController* controller,
|
| const gfx::FontList& font_list =
|
| default_label_font_list.DeriveWithSizeDelta(2);
|
| int padding = kTitleLineHeight - font_list.GetHeight();
|
| + int title_lines = notification.message().empty() ? kTitleNoMessageLineLimit
|
| + : kTitleLineLimit;
|
| + int title_character_limit =
|
| + kNotificationWidth * title_lines / kMinPixelsPerTitleCharacter;
|
| title_view_ = new BoundedLabel(
|
| - gfx::TruncateString(notification.title(), kTitleCharacterLimit),
|
| + gfx::TruncateString(notification.title(), title_character_limit),
|
| font_list);
|
| title_view_->SetLineHeight(kTitleLineHeight);
|
| - title_view_->SetLineLimit(message_center::kTitleLineLimit);
|
| + title_view_->SetLineLimit(title_lines);
|
| title_view_->SetColors(message_center::kRegularTextColor,
|
| kRegularTextBackgroundColor);
|
| title_view_->SetBorder(MakeTextBorder(padding, 3, 0));
|
|
|