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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm

Issue 2912403004: [Mac] Mirror bookmark bubble folder dropdown in RTL (Closed)
Patch Set: Created 3 years, 6 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
« 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/ui/bookmarks/bookmark_bubble_observer.h" 10 #include "chrome/browser/ui/bookmarks/bookmark_bubble_observer.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // Info bubble view to: 322 // Info bubble view to:
323 // - Fix the leading margin on the title. 323 // - Fix the leading margin on the title.
324 // - Flip containers. 324 // - Flip containers.
325 cocoa_l10n_util::FlipAllSubviewsIfNecessary([bigTitle_ superview]); 325 cocoa_l10n_util::FlipAllSubviewsIfNecessary([bigTitle_ superview]);
326 // Margin on the labels. 326 // Margin on the labels.
327 cocoa_l10n_util::FlipAllSubviewsIfNecessary(fieldLabelsContainer_); 327 cocoa_l10n_util::FlipAllSubviewsIfNecessary(fieldLabelsContainer_);
328 // Margin on the fields. 328 // Margin on the fields.
329 cocoa_l10n_util::FlipAllSubviewsIfNecessary([nameTextField_ superview]); 329 cocoa_l10n_util::FlipAllSubviewsIfNecessary([nameTextField_ superview]);
330 // Relative order of the done and options buttons. 330 // Relative order of the done and options buttons.
331 cocoa_l10n_util::FlipAllSubviewsIfNecessary(trailingButtonContainer_); 331 cocoa_l10n_util::FlipAllSubviewsIfNecessary(trailingButtonContainer_);
332 if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
333 [folderPopUpButton_ setUserInterfaceLayoutDirection:
334 NSUserInterfaceLayoutDirectionRightToLeft];
335 [folderPopUpButton_ setAlignment:NSNaturalTextAlignment];
Sidney San Martín 2017/06/01 18:52:19 nit: It looks like this is only needed because fol
lgrey 2017/06/02 16:10:18 Done.
336 }
332 } 337 }
333 338
334 @end // BookmarkBubbleController 339 @end // BookmarkBubbleController
335 340
336 341
337 @implementation BookmarkBubbleController (ExposedForUnitTesting) 342 @implementation BookmarkBubbleController (ExposedForUnitTesting)
338 343
339 - (NSView*)syncPromoPlaceholder { 344 - (NSView*)syncPromoPlaceholder {
340 return syncPromoPlaceholder_; 345 return syncPromoPlaceholder_;
341 } 346 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; 395 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue];
391 DCHECK(idx != -1); 396 DCHECK(idx != -1);
392 [folderPopUpButton_ selectItemAtIndex:idx]; 397 [folderPopUpButton_ selectItemAtIndex:idx];
393 } 398 }
394 399
395 - (NSPopUpButton*)folderPopUpButton { 400 - (NSPopUpButton*)folderPopUpButton {
396 return folderPopUpButton_; 401 return folderPopUpButton_;
397 } 402 }
398 403
399 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) 404 @end // implementation BookmarkBubbleController(ExposedForUnitTesting)
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