Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: ui/message_center/message_center_bubble.cc

Issue 11377005: Replace Label::Alignment with gfx::HorizontalAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remaining Label::Alignment references. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/message_center/base_format_view.cc ('k') | ui/message_center/message_simple_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/message_center_bubble.h" 5 #include "ui/message_center/message_center_bubble.h"
6 6
7 #include "grit/ui_strings.h" 7 #include "grit/ui_strings.h"
8 #include "ui/base/l10n/l10n_util.h" 8 #include "ui/base/l10n/l10n_util.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 scroll_content_->AddChildView(view); 202 scroll_content_->AddChildView(view);
203 if (++num_children >= 203 if (++num_children >=
204 NotificationList::kMaxVisibleMessageCenterNotifications) { 204 NotificationList::kMaxVisibleMessageCenterNotifications) {
205 break; 205 break;
206 } 206 }
207 } 207 }
208 if (num_children == 0) { 208 if (num_children == 0) {
209 views::Label* label = new views::Label(l10n_util::GetStringUTF16( 209 views::Label* label = new views::Label(l10n_util::GetStringUTF16(
210 IDS_MESSAGE_CENTER_NO_MESSAGES)); 210 IDS_MESSAGE_CENTER_NO_MESSAGES));
211 label->SetFont(label->font().DeriveFont(1)); 211 label->SetFont(label->font().DeriveFont(1));
212 label->SetHorizontalAlignment(views::Label::ALIGN_CENTER);
213 label->SetEnabledColor(SK_ColorGRAY); 212 label->SetEnabledColor(SK_ColorGRAY);
214 scroll_content_->AddChildView(label); 213 scroll_content_->AddChildView(label);
215 button_view_->SetCloseAllVisible(false); 214 button_view_->SetCloseAllVisible(false);
216 } else { 215 } else {
217 button_view_->SetCloseAllVisible(true); 216 button_view_->SetCloseAllVisible(true);
218 } 217 }
219 SizeScrollContent(); 218 SizeScrollContent();
220 Layout(); 219 Layout();
221 if (GetWidget()) 220 if (GetWidget())
222 GetWidget()->GetRootView()->SchedulePaint(); 221 GetWidget()->GetRootView()->SchedulePaint();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 294 }
296 295
297 void MessageCenterBubble::OnMouseExitedView() { 296 void MessageCenterBubble::OnMouseExitedView() {
298 } 297 }
299 298
300 size_t MessageCenterBubble::NumMessageViewsForTest() const { 299 size_t MessageCenterBubble::NumMessageViewsForTest() const {
301 return contents_view_->NumMessageViews(); 300 return contents_view_->NumMessageViews();
302 } 301 }
303 302
304 } // namespace message_center 303 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/base_format_view.cc ('k') | ui/message_center/message_simple_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698