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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.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/toolbar/toolbar_button.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index beae60d3d9d5f7646fb14de10bd66bfd3b79d3b1..96191078ce655869c0b1360798d915037b4072c9 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -570,8 +570,7 @@ void ToolbarView::Layout() {
home_->bounds().right() + GetLayoutConstant(TOOLBAR_STANDARD_SPACING);
int app_menu_width = app_menu_button_->GetPreferredSize().width();
- const int right_padding =
- GetLayoutConstant(TOOLBAR_LOCATION_BAR_RIGHT_PADDING);
+ const int right_padding = GetLayoutConstant(TOOLBAR_STANDARD_SPACING);
// Note that the browser actions container has its own internal left and right
// padding to visually separate it from the location bar and app menu button.
@@ -710,8 +709,6 @@ gfx::Size ToolbarView::GetSizeInternal(
const int element_padding = GetLayoutConstant(TOOLBAR_ELEMENT_PADDING);
const int browser_actions_width =
(browser_actions_->*get_size)().width();
- const int right_padding =
- GetLayoutConstant(TOOLBAR_LOCATION_BAR_RIGHT_PADDING);
const int content_width =
2 * GetToolbarHorizontalPadding() + (back_->*get_size)().width() +
element_padding + (forward_->*get_size)().width() + element_padding +
@@ -720,7 +717,9 @@ gfx::Size ToolbarView::GetSizeInternal(
? element_padding + (home_->*get_size)().width()
: 0) +
GetLayoutConstant(TOOLBAR_STANDARD_SPACING) +
- (browser_actions_width > 0 ? browser_actions_width : right_padding) +
+ (browser_actions_width > 0
+ ? browser_actions_width
+ : GetLayoutConstant(TOOLBAR_STANDARD_SPACING)) +
(app_menu_button_->*get_size)().width();
size.Enlarge(content_width, 0);
}
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698