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

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

Issue 2523783002: Top Chrome MD cleanup - get rid of most of GetLayoutInsets. (Closed)
Patch Set: fix typo 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/views/toolbar/app_menu_button.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index a8da27d3c7dbe770ee4e2fbba180d9f9bcabd113..00e427c500ba6dfb5d3778db8621be4d9013d3e2 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -64,8 +64,8 @@ gfx::Size ToolbarButton::GetPreferredSize() const {
label_size.width() + GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING),
0);
}
- gfx::Insets insets(GetLayoutInsets(TOOLBAR_BUTTON));
- size.Enlarge(insets.width(), insets.height());
+ const int pad = GetLayoutConstant(TOOLBAR_BUTTON_PADDING);
+ size.Enlarge(2 * pad, 2 * pad);
return size;
}
@@ -150,7 +150,7 @@ std::unique_ptr<views::LabelButtonBorder> ToolbarButton::CreateDefaultBorder()
views::LabelButton::CreateDefaultBorder();
if (ThemeServiceFactory::GetForProfile(profile_)->UsingSystemTheme())
- border->set_insets(GetLayoutInsets(TOOLBAR_BUTTON));
+ border->set_insets(gfx::Insets(GetLayoutConstant(TOOLBAR_BUTTON_PADDING)));
return border;
}
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu_button.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698