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

Unified Diff: chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h

Issue 2354323003: Set minimal width for the username in the password bubble on Mac. (Closed)
Patch Set: Created 4 years, 3 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 | chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h
diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h b/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h
index 476569422103dc6bd9cbc4789bd636326fcbd6b1..a438b111a6c0a587202b04726f9762cad24546fb 100644
--- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h
+++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h
@@ -19,6 +19,7 @@ constexpr CGFloat kDesiredBubbleWidth = 370;
constexpr CGFloat kFramePadding = 16;
constexpr CGFloat kDesiredRowWidth = kDesiredBubbleWidth - 2 * kFramePadding;
constexpr CGFloat kItemLabelSpacing = 10;
+constexpr CGFloat kMinUsernameSize = 50;
constexpr CGFloat kRelatedControlHorizontalPadding = 2;
constexpr CGFloat kRelatedControlVerticalSpacing = 8;
constexpr CGFloat kTitleTextInset = 2;
@@ -36,7 +37,8 @@ NSSize LabelSize(int resourceID);
void InitLabel(NSTextField* textField, const base::string16& text);
// Returns widths of 2 columns, that are proportional to |columnsWidth| and
-// their total width is equal to |maxWidth|.
+// their total width is equal to |maxWidth|. The first column won't be shrunk to
+// less than |kMinUsernameSize|.
std::pair<CGFloat, CGFloat> GetResizedColumns(
CGFloat maxWidth,
std::pair<CGFloat, CGFloat> columnsWidth);
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698