Commit 820f59a7 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Use views-sized browser actions for MacViews

Fixes bug where the larger MD Refresh 28dp inkdrops overflow into
browser-action insets. The prior code returned 24dp icon areas as it
assumed that MacOS was always using the Cocoa implementation. This now
effectively matches ToolbarButton sizes in views.

Bug: chromium:822069
Change-Id: I27a8b2c36fe0bba57ee698aae940b1b0c472f29f
Reviewed-on: https://chromium-review.googlesource.com/1068179
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561037}
parent 87d0207f
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "extensions/browser/runtime_data.h" #include "extensions/browser/runtime_data.h"
#include "extensions/common/extension.h" #include "extensions/common/extension.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
namespace { namespace {
...@@ -137,12 +138,11 @@ void ToolbarActionsBar::RegisterProfilePrefs( ...@@ -137,12 +138,11 @@ void ToolbarActionsBar::RegisterProfilePrefs(
// static // static
gfx::Size ToolbarActionsBar::GetIconAreaSize() { gfx::Size ToolbarActionsBar::GetIconAreaSize() {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// On the Mac, the spec is a 24x24 button in a 28x28 space. // On Cocoa, the spec is a 24x24 button in a 28x28 space.
constexpr gfx::Size kIconAreaSize(24, 24); if (!base::FeatureList::IsEnabled(features::kViewsBrowserWindows))
#else return gfx::Size(24, 24);
constexpr gfx::Size kIconAreaSize(28, 28);
#endif #endif
return kIconAreaSize; return gfx::Size(28, 28);
} }
gfx::Size ToolbarActionsBar::GetViewSize() const { gfx::Size ToolbarActionsBar::GetViewSize() const {
......
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