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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 1322323006: Change toolbar height for material design on Ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 15966f5efc0877b0acd4e2e83ae031fade92526e..50d42efccb98d309b15fc8629fb0bebc4016a50e 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -666,6 +666,8 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
int y = toolbar_bounds.y();
int h = toolbar_bounds.height();
+ const bool mode_material = ui::MaterialDesignController::IsModeMaterial();
+
// Gross hack: We split the toolbar images into two pieces, since sometimes
// (popup mode) the toolbar isn't tall enough to show the whole image. The
// split happens between the top shadow section and the bottom gradient
@@ -737,7 +739,8 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
bottom_edge_height, false);
gfx::ImageSkia* toolbar_center =
- tp->GetImageSkiaNamed(IDR_CONTENT_TOP_CENTER);
+ tp->GetImageSkiaNamed(mode_material ?
+ IDR_THEME_TOOLBAR : IDR_CONTENT_TOP_CENTER);
canvas->TileImageInt(*toolbar_center, 0, 0, left_x + toolbar_left->width(),
y, right_x - (left_x + toolbar_left->width()),
split_point);
@@ -751,15 +754,24 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
bottom_edge_height, right_x, bottom_y, toolbar_right->width(),
bottom_edge_height, false);
- // Draw the content/toolbar separator.
- if (ui::MaterialDesignController::IsModeMaterial()) {
+ if (mode_material) {
+ // Draw the content/toolbar separator.
toolbar_bounds.Inset(kClientEdgeThickness, 0);
BrowserView::Paint1pxHorizontalLine(
canvas,
ThemeProperties::GetDefaultColor(
ThemeProperties::COLOR_TOOLBAR_SEPARATOR),
toolbar_bounds);
+
+ // Draw the tabstrip separator.
+ BrowserView::Paint1pxHorizontalLine(
+ canvas,
+ ThemeProperties::GetDefaultColor(
+ ThemeProperties::COLOR_TOOLBAR_SEPARATOR),
+ gfx::RectF(0, toolbar_bounds.y() - 1,
+ toolbar_bounds.width(), kClientEdgeThickness));
} else {
+ // Draw the content/toolbar separator.
canvas->FillRect(
gfx::Rect(x + kClientEdgeThickness,
toolbar_bounds.bottom() - kClientEdgeThickness,

Powered by Google App Engine
This is Rietveld 408576698