Commit a0200b75 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

[Mac RTL] Fix app menu button spacing in RTL

Change-Id: I5d7424aca855f68b3bdf30532f4a841e9fdf7444
Reviewed-on: https://chromium-review.googlesource.com/887603Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534085}
parent d8bf9846
...@@ -310,7 +310,8 @@ class NotificationBridge : public AppMenuIconController::Delegate { ...@@ -310,7 +310,8 @@ class NotificationBridge : public AppMenuIconController::Delegate {
// Adjust the menu button's position. // Adjust the menu button's position.
NSRect menuButtonFrame = [appMenuButton_ frame]; NSRect menuButtonFrame = [appMenuButton_ frame];
if (isRTL) { if (isRTL) {
menuButtonFrame.origin.x = [ToolbarController appMenuPadding]; menuButtonFrame.origin.x =
[ToolbarController appMenuPadding] + kButtonInset;
} else { } else {
CGFloat menuButtonFrameMaxX = CGFloat menuButtonFrameMaxX =
NSMaxX(toolbarBounds) - [ToolbarController appMenuPadding]; NSMaxX(toolbarBounds) - [ToolbarController appMenuPadding];
...@@ -353,7 +354,7 @@ class NotificationBridge : public AppMenuIconController::Delegate { ...@@ -353,7 +354,7 @@ class NotificationBridge : public AppMenuIconController::Delegate {
containerFrame.origin.y = locationBarFrame.origin.y + kContainerYOffset; containerFrame.origin.y = locationBarFrame.origin.y + kContainerYOffset;
containerFrame.size.height = toolbarButtonSize.height; containerFrame.size.height = toolbarButtonSize.height;
if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
containerFrame.origin.x = NSMinX(locationBarFrame); containerFrame.origin.x = NSMinX(locationBarFrame) - kButtonInset;
[browserActionsContainerView_ setFrame:containerFrame]; [browserActionsContainerView_ setFrame:containerFrame];
[browserActionsContainerView_ setAutoresizingMask:trailingButtonMask]; [browserActionsContainerView_ setAutoresizingMask:trailingButtonMask];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment