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

Unified Diff: chrome/browser/ui/views/frame/glass_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/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index ae8d6f72541850731250e92616c24432e7ada3a4..1070cb2f9d04370ba58e79b89701abf3d98e195d 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -360,9 +360,11 @@ void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
int x = toolbar_bounds.x();
int w = toolbar_bounds.width();
+ const bool mode_material = ui::MaterialDesignController::IsModeMaterial();
+
gfx::ImageSkia* theme_toolbar = tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR);
gfx::ImageSkia* toolbar_center = tp->GetImageSkiaNamed(
- IDR_CONTENT_TOP_CENTER);
+ mode_material ? IDR_THEME_TOOLBAR : IDR_CONTENT_TOP_CENTER);
// Tile the toolbar image starting at the frame edge on the left and where
// the tabstrip is on the top.
@@ -418,15 +420,24 @@ void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
}
}
- // 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