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/passwords/manage_password_item_view.cc

Issue 274803003: Password bubble: Fix size of "Password deleted" and "Undo" UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/passwords/manage_password_item_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_password_item_view.h"
6 6
7 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" 7 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
8 #include "components/password_manager/core/common/password_manager_ui.h" 8 #include "components/password_manager/core/common/password_manager_ui.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Undo View 101 // Undo View
102 ManagePasswordItemView::UndoView::UndoView(ManagePasswordItemView* parent) 102 ManagePasswordItemView::UndoView::UndoView(ManagePasswordItemView* parent)
103 : parent_(parent) { 103 : parent_(parent) {
104 views::GridLayout* layout = new views::GridLayout(this); 104 views::GridLayout* layout = new views::GridLayout(this);
105 SetLayoutManager(layout); 105 SetLayoutManager(layout);
106 106
107 views::Label* text = 107 views::Label* text =
108 new views::Label(l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_DELETED)); 108 new views::Label(l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_DELETED));
109 text->SetHorizontalAlignment(gfx::ALIGN_LEFT); 109 text->SetHorizontalAlignment(gfx::ALIGN_LEFT);
110 text->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
111 ui::ResourceBundle::SmallFont));
110 112
111 undo_link_ = 113 undo_link_ =
112 new views::Link(l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_UNDO)); 114 new views::Link(l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_UNDO));
113 undo_link_->SetHorizontalAlignment(gfx::ALIGN_RIGHT); 115 undo_link_->SetHorizontalAlignment(gfx::ALIGN_RIGHT);
114 undo_link_->set_listener(this); 116 undo_link_->set_listener(this);
115 undo_link_->SetUnderline(false); 117 undo_link_->SetUnderline(false);
118 undo_link_->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
119 ui::ResourceBundle::SmallFont));
116 120
117 parent->BuildColumnSet(layout, TWO_COLUMN_SET); 121 parent->BuildColumnSet(layout, TWO_COLUMN_SET);
118 layout->StartRowWithPadding( 122 layout->StartRowWithPadding(
119 0, TWO_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing); 123 0, TWO_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing);
120 layout->AddView(text); 124 layout->AddView(text);
121 layout->AddView(undo_link_); 125 layout->AddView(undo_link_);
122 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 126 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
123 } 127 }
124 128
125 void ManagePasswordItemView::UndoView::LinkClicked(views::Link* sender, 129 void ManagePasswordItemView::UndoView::LinkClicked(views::Link* sender,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 238
235 void ManagePasswordItemView::NotifyClickedDelete() { 239 void ManagePasswordItemView::NotifyClickedDelete() {
236 delete_password_ = true; 240 delete_password_ = true;
237 Refresh(); 241 Refresh();
238 } 242 }
239 243
240 void ManagePasswordItemView::NotifyClickedUndo() { 244 void ManagePasswordItemView::NotifyClickedUndo() {
241 delete_password_ = false; 245 delete_password_ = false;
242 Refresh(); 246 Refresh();
243 } 247 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698