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

Side by Side Diff: chrome/browser/ui/views/constrained_window_frame_simple.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
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 "chrome/browser/ui/views/constrained_window_frame_simple.h" 5 #include "chrome/browser/ui/views/constrained_window_frame_simple.h"
6 6
7 #include "chrome/browser/ui/constrained_window_constants.h" 7 #include "chrome/browser/ui/constrained_window_constants.h"
8 #include "chrome/browser/ui/constrained_window.h" 8 #include "chrome/browser/ui/constrained_window.h"
9 #include "chrome/browser/ui/views/constrained_window_views.h" 9 #include "chrome/browser/ui/views/constrained_window_views.h"
10 #include "grit/chromium_strings.h" 10 #include "grit/chromium_strings.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::LEADING, 0, 68 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::LEADING, 0,
69 views::GridLayout::USE_PREF, 0, 0); // Close Button. 69 views::GridLayout::USE_PREF, 0, 0); // Close Button.
70 70
71 layout->StartRow(0, 0); 71 layout->StartRow(0, 0);
72 72
73 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 73 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
74 title_label_ = new views::Label( 74 title_label_ = new views::Label(
75 container->widget_delegate()->GetWindowTitle()); 75 container->widget_delegate()->GetWindowTitle());
76 title_label_->SetFont(rb.GetFont( 76 title_label_->SetFont(rb.GetFont(
77 ConstrainedWindowConstants::kTitleFontStyle)); 77 ConstrainedWindowConstants::kTitleFontStyle));
78 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 78 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
79 title_label_->SetEnabledColor(ConstrainedWindow::GetTextColor()); 79 title_label_->SetEnabledColor(ConstrainedWindow::GetTextColor());
80 title_label_->set_border(views::Border::CreateEmptyBorder( 80 title_label_->set_border(views::Border::CreateEmptyBorder(
81 ConstrainedWindowConstants::kTitleTopPadding - kHeaderTopPadding, 81 ConstrainedWindowConstants::kTitleTopPadding - kHeaderTopPadding,
82 0, 0, 0)); 82 0, 0, 0));
83 layout->AddView(title_label_); 83 layout->AddView(title_label_);
84 84
85 close_button_ = new views::ImageButton(this); 85 close_button_ = new views::ImageButton(this);
86 close_button_->SetImage(views::CustomButton::BS_NORMAL, 86 close_button_->SetImage(views::CustomButton::BS_NORMAL,
87 rb.GetImageSkiaNamed(IDR_WEB_UI_CLOSE)); 87 rb.GetImageSkiaNamed(IDR_WEB_UI_CLOSE));
88 close_button_->SetImage(views::CustomButton::BS_HOT, 88 close_button_->SetImage(views::CustomButton::BS_HOT,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return GetWindowBoundsForClientBounds( 193 return GetWindowBoundsForClientBounds(
194 gfx::Rect(container_->client_view()->GetPreferredSize())).size(); 194 gfx::Rect(container_->client_view()->GetPreferredSize())).size();
195 } 195 }
196 196
197 void ConstrainedWindowFrameSimple::ButtonPressed(views::Button* sender, 197 void ConstrainedWindowFrameSimple::ButtonPressed(views::Button* sender,
198 const ui::Event& event) { 198 const ui::Event& event) {
199 DCHECK(close_button_); 199 DCHECK(close_button_);
200 if (sender == close_button_) 200 if (sender == close_button_)
201 sender->GetWidget()->Close(); 201 sender->GetWidget()->Close();
202 } 202 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/confirm_bubble_views.cc ('k') | chrome/browser/ui/views/content_setting_bubble_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698