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

Side by Side Diff: ui/message_center/message_simple_view.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/message_center_bubble.cc ('k') | ui/views/controls/button/label_button.h » ('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_simple_view.h" 5 #include "ui/message_center/message_simple_view.h"
6 6
7 #include "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/views/controls/button/image_button.h" 9 #include "ui/views/controls/button/image_button.h"
10 #include "ui/views/controls/image_view.h" 10 #include "ui/views/controls/image_view.h"
(...skipping 21 matching lines...) Expand all
32 set_background(views::Background::CreateSolidBackground(bg_color)); 32 set_background(views::Background::CreateSolidBackground(bg_color));
33 SetPaintToLayer(true); 33 SetPaintToLayer(true);
34 SetFillsBoundsOpaquely(false); 34 SetFillsBoundsOpaquely(false);
35 35
36 icon_ = new views::ImageView; 36 icon_ = new views::ImageView;
37 icon_->SetImageSize( 37 icon_->SetImageSize(
38 gfx::Size(kWebNotificationIconSize, kWebNotificationIconSize)); 38 gfx::Size(kWebNotificationIconSize, kWebNotificationIconSize));
39 icon_->SetImage(notification_.image); 39 icon_->SetImage(notification_.image);
40 40
41 views::Label* title = new views::Label(notification_.title); 41 views::Label* title = new views::Label(notification_.title);
42 title->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 42 title->SetHorizontalAlignment(gfx::ALIGN_LEFT);
43 title->SetFont(title->font().DeriveFont(0, gfx::Font::BOLD)); 43 title->SetFont(title->font().DeriveFont(0, gfx::Font::BOLD));
44 views::Label* message = new views::Label(notification_.message); 44 views::Label* message = new views::Label(notification_.message);
45 message->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 45 message->SetHorizontalAlignment(gfx::ALIGN_LEFT);
46 message->SetMultiLine(true); 46 message->SetMultiLine(true);
47 47
48 close_button_ = new views::ImageButton(this); 48 close_button_ = new views::ImageButton(this);
49 close_button_->SetImage( 49 close_button_->SetImage(
50 views::CustomButton::BS_NORMAL, 50 views::CustomButton::BS_NORMAL,
51 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(IDR_MESSAGE_CLOSE)); 51 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(IDR_MESSAGE_CLOSE));
52 close_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 52 close_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
53 views::ImageButton::ALIGN_MIDDLE); 53 views::ImageButton::ALIGN_MIDDLE);
54 54
55 views::GridLayout* layout = new views::GridLayout(this); 55 views::GridLayout* layout = new views::GridLayout(this);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 layout->AddView(title, 1, 1); 94 layout->AddView(title, 1, 1);
95 layout->AddView(close_button_, 1, 1); 95 layout->AddView(close_button_, 1, 1);
96 96
97 layout->StartRow(0, 0); 97 layout->StartRow(0, 0);
98 layout->SkipColumns(2); 98 layout->SkipColumns(2);
99 layout->AddView(message, 1, 1); 99 layout->AddView(message, 1, 1);
100 layout->AddPaddingRow(0, kPaddingBetweenItems); 100 layout->AddPaddingRow(0, kPaddingBetweenItems);
101 } 101 }
102 102
103 } // namespace message_center 103 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/message_center_bubble.cc ('k') | ui/views/controls/button/label_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698