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

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: CL comment 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 // Fix up pop-up button from the nib.
334 [folderPopUpButton_ setUserInterfaceLayoutDirection:
335 NSUserInterfaceLayoutDirectionRightToLeft];
336 [folderPopUpButton_ setAlignment:NSNaturalTextAlignment];
337 }
332 } 338 }
333 339
334 @end // BookmarkBubbleController 340 @end // BookmarkBubbleController
335 341
336 342
337 @implementation BookmarkBubbleController (ExposedForUnitTesting) 343 @implementation BookmarkBubbleController (ExposedForUnitTesting)
338 344
339 - (NSView*)syncPromoPlaceholder { 345 - (NSView*)syncPromoPlaceholder {
340 return syncPromoPlaceholder_; 346 return syncPromoPlaceholder_;
341 } 347 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; 396 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue];
391 DCHECK(idx != -1); 397 DCHECK(idx != -1);
392 [folderPopUpButton_ selectItemAtIndex:idx]; 398 [folderPopUpButton_ selectItemAtIndex:idx];
393 } 399 }
394 400
395 - (NSPopUpButton*)folderPopUpButton { 401 - (NSPopUpButton*)folderPopUpButton {
396 return folderPopUpButton_; 402 return folderPopUpButton_;
397 } 403 }
398 404
399 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) 405 @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