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

Unified Diff: chrome/browser/ui/cocoa/framed_browser_window.mm

Issue 2541583002: [Mac] Don't flip window controls in RTL for macOS < 10.12 (Closed)
Patch Set: Created 4 years, 1 month 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/browser_window_layout.mm ('k') | chrome/browser/ui/cocoa/l10n_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/framed_browser_window.mm
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.mm b/chrome/browser/ui/cocoa/framed_browser_window.mm
index e482aab0b281d5cd68c9930c6e045b78f2bd8b02..65e14a23e2979575da4ec570af4bf26dacbcaae7 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window.mm
@@ -58,7 +58,7 @@ const CGFloat kWindowGradientHeight = 24.0;
// location (frame bottom is moved down so the buttons are moved down as well).
- (void)adjustTitlebarContainer:(NSView*)titlebarContainer;
// Adds layout constraints to window buttons, respecting flag returned by
-// |ShouldDoExperimentalRTLLayout| method.
+// |ShouldFlipWindowControlsInRTL| method.
- (void)setWindowButtonsConstraints;
// Replaces -[NSThemeFrame addTrackingArea:] with implementation that ignores
// tracking rect if its size is the same as the size of window buttons rect
@@ -71,7 +71,7 @@ const CGFloat kWindowGradientHeight = 24.0;
// titlebar container with correct frame.
- (void)titlebarDidChangeFrameNotification:(NSNotification*)notification;
// Adds layout constraints to the given window button so it displayed at correct
-// location. This respects flag returned by |ShouldDoExperimentalRTLLayout|
+// location. This respects flag returned by |ShouldFlipWindowControlsInRTL|
// method.
- (void)setLeadingOffset:(CGFloat)leadingOffset
toButton:(NSWindowButton)buttonType;
@@ -271,11 +271,11 @@ const CGFloat kWindowGradientHeight = 24.0;
NSButton* button = [self standardWindowButton:buttonType];
[button setTranslatesAutoresizingMaskIntoConstraints:NO];
- // Do not use leadingAnchor because |ShouldDoExperimentalRTLLayout|
+ // Do not use leadingAnchor because |ShouldFlipWindowControlsInRTL|
// should determine if current locale is RTL.
NSLayoutXAxisAnchor* leadingSourceAnchor = [button leftAnchor];
NSLayoutXAxisAnchor* leadingTargetAnchor = [[button superview] leftAnchor];
- if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
+ if (cocoa_l10n_util::ShouldFlipWindowControlsInRTL()) {
leadingSourceAnchor = [button rightAnchor];
leadingTargetAnchor = [[button superview] rightAnchor];
leadingOffset = -leadingOffset;
@@ -338,7 +338,7 @@ const CGFloat kWindowGradientHeight = 24.0;
break;
}
- if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
+ if (cocoa_l10n_util::ShouldFlipWindowControlsInRTL()) {
buttonFrame.origin.x =
NSWidth([self frame]) - buttonFrame.origin.x - NSWidth([button frame]);
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_layout.mm ('k') | chrome/browser/ui/cocoa/l10n_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698