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

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

Issue 19531006: requestAutocomplete: fix some text colors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +PreferredSizeChanged override Created 7 years, 5 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 (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/autofill/autofill_dialog_views.h" 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // The side padding, in pixels, for the suggestions menu dropdown arrows. 103 // The side padding, in pixels, for the suggestions menu dropdown arrows.
104 const int kMenuButtonHorizontalPadding = 20; 104 const int kMenuButtonHorizontalPadding = 20;
105 105
106 // The padding around text in the overlay view. 106 // The padding around text in the overlay view.
107 const int kOverlayTextPadding = 20; 107 const int kOverlayTextPadding = 20;
108 108
109 // Spacing between lines of text in the overlay view. 109 // Spacing between lines of text in the overlay view.
110 const int kOverlayTextInterlineSpacing = 10; 110 const int kOverlayTextInterlineSpacing = 10;
111 111
112 // A dimmer text color used in various parts of the dialog. TODO(estade): should
113 // this be part of NativeTheme? Currently the value is duplicated in several
114 // places.
115 const SkColor kGreyTextColor = SkColorSetRGB(102, 102, 102);
116
112 const char kDecoratedTextfieldClassName[] = "autofill/DecoratedTextfield"; 117 const char kDecoratedTextfieldClassName[] = "autofill/DecoratedTextfield";
113 const char kNotificationAreaClassName[] = "autofill/NotificationArea"; 118 const char kNotificationAreaClassName[] = "autofill/NotificationArea";
114 const char kOverlayViewClassName[] = "autofill/OverlayView"; 119 const char kOverlayViewClassName[] = "autofill/OverlayView";
115 120
116 typedef ui::MultiAnimation::Part Part; 121 typedef ui::MultiAnimation::Part Part;
117 typedef ui::MultiAnimation::Parts Parts; 122 typedef ui::MultiAnimation::Parts Parts;
118 123
119 views::Border* CreateLabelAlignmentBorder() { 124 views::Border* CreateLabelAlignmentBorder() {
120 // TODO(estade): this should be made to match the native textfield top 125 // TODO(estade): this should be made to match the native textfield top
121 // inset. It's hard to get at, so for now it's hard-coded. 126 // inset. It's hard to get at, so for now it's hard-coded.
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 new views::BoxLayout(views::BoxLayout::kVertical, 1488 new views::BoxLayout(views::BoxLayout::kVertical,
1484 kLegalDocPadding, 1489 kLegalDocPadding,
1485 kLegalDocPadding, 1490 kLegalDocPadding,
1486 0)); 1491 0));
1487 footnote_view_->set_border( 1492 footnote_view_->set_border(
1488 views::Border::CreateSolidSidedBorder(1, 0, 0, 0, kSubtleBorderColor)); 1493 views::Border::CreateSolidSidedBorder(1, 0, 0, 0, kSubtleBorderColor));
1489 footnote_view_->set_background( 1494 footnote_view_->set_background(
1490 views::Background::CreateSolidBackground(kShadingColor)); 1495 views::Background::CreateSolidBackground(kShadingColor));
1491 1496
1492 legal_document_view_ = new views::StyledLabel(string16(), this); 1497 legal_document_view_ = new views::StyledLabel(string16(), this);
1493 legal_document_view_->SetDisplayedOnBackgroundColor(kShadingColor); 1498 views::StyledLabel::RangeStyleInfo default_style;
1499 default_style.color = kGreyTextColor;
1500 legal_document_view_->SetDefaultStyle(default_style);
1494 1501
1495 footnote_view_->AddChildView(legal_document_view_); 1502 footnote_view_->AddChildView(legal_document_view_);
1496 footnote_view_->SetVisible(false); 1503 footnote_view_->SetVisible(false);
1497 1504
1498 return footnote_view_; 1505 return footnote_view_;
1499 } 1506 }
1500 1507
1501 views::View* AutofillDialogViews::CreateOverlayView() { 1508 views::View* AutofillDialogViews::CreateOverlayView() {
1502 return overlay_view_; 1509 return overlay_view_;
1503 } 1510 }
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2219 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2213 : section(section), 2220 : section(section),
2214 container(NULL), 2221 container(NULL),
2215 manual_input(NULL), 2222 manual_input(NULL),
2216 suggested_info(NULL), 2223 suggested_info(NULL),
2217 suggested_button(NULL) {} 2224 suggested_button(NULL) {}
2218 2225
2219 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2226 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2220 2227
2221 } // namespace autofill 2228 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698