diff options
Diffstat (limited to 'chrome/browser/ui/views/toolbar_view.cc')
-rw-r--r-- | chrome/browser/ui/views/toolbar_view.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc index a8300cf..1d87be7 100644 --- a/chrome/browser/ui/views/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar_view.cc @@ -78,6 +78,11 @@ static const int kPopupBottomSpacingGlass = 1; // corner of the wrench menu). static const int kBadgeTopMargin = 2; +#if defined(TOUCH_UI) +// Extra vertical padding above the location bar. +static const int kExtraVerticalPadding = 3; +#endif + static SkBitmap* kPopupBackgroundEdge = NULL; //////////////////////////////////////////////////////////////////////////////// @@ -528,8 +533,17 @@ void ToolbarView::Layout() { int available_width = width() - kEdgeSpacing - app_menu_width - browser_actions_width - location_x; - location_bar_->SetBounds(location_x, child_y, std::max(available_width, 0), - child_height); +#if defined(TOUCH_UI) + // Center the location bar vertically. + int location_y = std::min(child_y + kExtraVerticalPadding, height()); + int location_bar_height = std::max(height() - 2 * location_y, 0); +#else + int location_y = child_y; + int location_bar_height = child_height; +#endif + + location_bar_->SetBounds(location_x, location_y, std::max(available_width, 0), + location_bar_height); browser_actions_->SetBounds(location_bar_->x() + location_bar_->width(), 0, browser_actions_width, height()); |