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

Unified Diff: chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.mm

Issue 2601513003: Fix the title alignment for the password bubble on Mac. (Closed)
Patch Set: Created 4 years 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
Index: chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.mm b/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.mm
index 9727315c0d9db6d6c05f1510d62fae96ccd89da3..fe0224751084cc21784a6f9843bbb9f2d2a5f1d6 100644
--- a/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.mm
@@ -13,6 +13,7 @@
#include "chrome/grit/generated_resources.h"
#include "components/strings/grit/components_strings.h"
#include "skia/ext/skia_utils_mac.h"
+#import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#import "ui/base/cocoa/controls/hyperlink_text_view.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -64,6 +65,10 @@
NSTextField* titleLabel =
[self addTitleLabel:base::SysUTF16ToNSString(self.model->title())
toView:view];
+ // Title should occupy the whole width to that it's aligned properly for RTL.
+ [titleLabel setFrameSize:NSMakeSize(kDesiredBubbleWidth - 2 * kFramePadding,
+ 0)];
+ [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:titleLabel];
// Text.
confirmationText_.reset([[HyperlinkTextView alloc] initWithFrame:NSZeroRect]);

Powered by Google App Engine
This is Rietveld 408576698