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

Side by Side Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc

Issue 284753002: Add main axis alignment for BoxLayout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove set_spread_blank_space, rename to MainAxisAlignment Created 6 years, 7 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/autofill/password_generation_popup_view_views. h" 5 #include "chrome/browser/ui/views/autofill/password_generation_popup_view_views. h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" 8 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 21 matching lines...) Expand all
32 public: 32 public:
33 PasswordRow(const base::string16& password, 33 PasswordRow(const base::string16& password,
34 const base::string16& suggestion, 34 const base::string16& suggestion,
35 const gfx::FontList& font_list, 35 const gfx::FontList& font_list,
36 int horizontal_border) { 36 int horizontal_border) {
37 set_clip_insets(gfx::Insets( 37 set_clip_insets(gfx::Insets(
38 PasswordGenerationPopupView::kPasswordVerticalInset, 0, 38 PasswordGenerationPopupView::kPasswordVerticalInset, 0,
39 PasswordGenerationPopupView::kPasswordVerticalInset, 0)); 39 PasswordGenerationPopupView::kPasswordVerticalInset, 0));
40 views::BoxLayout* box_layout = new views::BoxLayout( 40 views::BoxLayout* box_layout = new views::BoxLayout(
41 views::BoxLayout::kHorizontal, horizontal_border, 0, 0); 41 views::BoxLayout::kHorizontal, horizontal_border, 0, 0);
42 box_layout->set_spread_blank_space(true); 42 box_layout->set_main_axis_alignment(
43 views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL);
43 SetLayoutManager(box_layout); 44 SetLayoutManager(box_layout);
44 45
45 password_label_ = new views::Label(password, font_list); 46 password_label_ = new views::Label(password, font_list);
46 password_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 47 password_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
47 AddChildView(password_label_); 48 AddChildView(password_label_);
48 49
49 suggestion_label_ = new views::Label(suggestion, font_list); 50 suggestion_label_ = new views::Label(suggestion, font_list);
50 suggestion_label_->SetHorizontalAlignment(gfx::ALIGN_RIGHT); 51 suggestion_label_->SetHorizontalAlignment(gfx::ALIGN_RIGHT);
51 suggestion_label_->SetEnabledColor(kExplanatoryTextColor); 52 suggestion_label_->SetEnabledColor(kExplanatoryTextColor);
52 AddChildView(suggestion_label_); 53 AddChildView(suggestion_label_);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 // If the top level widget can't be found, cancel the popup since we can't 181 // If the top level widget can't be found, cancel the popup since we can't
181 // fully set it up. 182 // fully set it up.
182 if (!observing_widget) 183 if (!observing_widget)
183 return NULL; 184 return NULL;
184 185
185 return new PasswordGenerationPopupViewViews(controller, observing_widget); 186 return new PasswordGenerationPopupViewViews(controller, observing_widget);
186 } 187 }
187 188
188 } // namespace autofill 189 } // namespace autofill
OLDNEW
« no previous file with comments | « ash/system/tray_accessibility.cc ('k') | chrome/browser/ui/views/message_center/message_center_widget_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698