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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu_button.cc

Issue 2555623002: Last round of cleaning up MD layout constants. (Closed)
Patch Set: pkasting review, remove debug code, rebase Created 4 years 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/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/app_menu_button.cc
diff --git a/chrome/browser/ui/views/toolbar/app_menu_button.cc b/chrome/browser/ui/views/toolbar/app_menu_button.cc
index 58937a5e8e183683ccaa0f897d7bba84e8db91cb..b66144b72777b37ec782de9132045b256d4ec868 100644
--- a/chrome/browser/ui/views/toolbar/app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu_button.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/ui/toolbar/app_menu_model.h"
#include "chrome/browser/ui/views/extensions/browser_action_drag_data.h"
#include "chrome/browser/ui/views/toolbar/app_menu.h"
+#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/grit/theme_resources.h"
#include "extensions/common/feature_switch.h"
@@ -108,10 +109,9 @@ void AppMenuButton::RemoveMenuListener(views::MenuListener* listener) {
}
gfx::Size AppMenuButton::GetPreferredSize() const {
- gfx::Size size(image()->GetPreferredSize());
- const int pad = GetLayoutConstant(TOOLBAR_BUTTON_PADDING);
- size.Enlarge(pad * 2, pad * 2);
- return size;
+ gfx::Rect rect(image()->GetPreferredSize());
+ rect.Inset(gfx::Insets(-ToolbarButton::kInteriorPadding));
+ return rect.size();
}
void AppMenuButton::UpdateIcon() {
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698