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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm

Issue 2905773003: [Mac] Mirror bookmark bubble in RTL (Closed)
Patch Set: Created 3 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 | « chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
index b548148dfa92ec464041532b8156f0c5f4f6ecb0..4375e5b96902fff2e02fc71d55a1082ec20ee2e3 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
@@ -14,6 +14,7 @@
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/bubble_sync_promo_controller.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
+#import "chrome/browser/ui/cocoa/l10n_util.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#import "chrome/browser/ui/cocoa/location_bar/star_decoration.h"
#include "chrome/browser/ui/sync/sync_promo_ui.h"
@@ -165,6 +166,8 @@ using bookmarks::BookmarkNode;
[bigTitle_ setStringValue:title];
}
+ [self adjustForRTLIfNecessary];
+
[self fillInFolderList];
// Ping me when things change out from under us. Unlike a normal
@@ -315,6 +318,19 @@ using bookmarks::BookmarkNode;
return locationBar ? locationBar->star_decoration() : nullptr;
}
+- (void)adjustForRTLIfNecessary {
+ // Info bubble view to:
+ // - Fix the leading margin on the title.
+ // - Flip containers.
+ cocoa_l10n_util::FlipAllSubviewsIfNecessary([bigTitle_ superview]);
+ // Margin on the labels.
+ cocoa_l10n_util::FlipAllSubviewsIfNecessary(fieldLabelsContainer_);
+ // Margin on the fields.
+ cocoa_l10n_util::FlipAllSubviewsIfNecessary([nameTextField_ superview]);
+ // Relative order of the done and options buttons.
+ cocoa_l10n_util::FlipAllSubviewsIfNecessary(trailingButtonContainer_);
+}
+
@end // BookmarkBubbleController
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698