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

Unified Diff: chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc

Issue 1972163002: Change the maximum account chooser height to 3.5 rows on Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc
diff --git a/chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc b/chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc
index b56e81e32a4e8e9af9d8503e299893f177627ff9..a98dc5c35fd529b0f35f58272a3429b4adda9544 100644
--- a/chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc
+++ b/chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc
@@ -26,10 +26,10 @@
namespace {
-// Maximum number of accounts displayed before vertical scrolling appears.
-const size_t kMaxAccounts = 3;
+// Maximum height of the credential list. The unit is one row's height.
+constexpr double kMaxHeightAccounts = 3.5;
-const int kVerticalAvatarMargin = 8;
+constexpr int kVerticalAvatarMargin = 8;
// An identifier for views::ColumnSet.
enum ColumnSetType {
@@ -88,7 +88,7 @@ views::ScrollView* CreateCredentialsView(
list_view->AddChildView(credential_view);
}
views::ScrollView* scroll_view = new views::ScrollView;
- scroll_view->ClipHeightTo(0, kMaxAccounts * item_height);
+ scroll_view->ClipHeightTo(0, kMaxHeightAccounts * item_height);
scroll_view->SetContents(list_view);
return scroll_view;
}
« 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