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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view_md.cc

Issue 2001843002: Use ink drop hover for focus states on toolbar buttons and location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/download/download_item_view_md.h" 5 #include "chrome/browser/ui/views/download/download_item_view_md.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 canvas->DrawColor(SK_ColorBLACK); 596 canvas->DrawColor(SK_ColorBLACK);
597 canvas->DrawColor( 597 canvas->DrawColor(
598 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TOOLBAR)); 598 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TOOLBAR));
599 599
600 DrawStatusText(canvas); 600 DrawStatusText(canvas);
601 DrawFilename(canvas); 601 DrawFilename(canvas);
602 DrawIcon(canvas); 602 DrawIcon(canvas);
603 OnPaintBorder(canvas); 603 OnPaintBorder(canvas);
604 604
605 if (HasFocus()) 605 if (HasFocus())
606 views::CustomButton::PaintMdFocusRing(canvas, this); 606 views::MdTextButton::PaintMdFocusRing(canvas, this);
607 } 607 }
608 608
609 int DownloadItemViewMd::GetYForFilenameText() const { 609 int DownloadItemViewMd::GetYForFilenameText() const {
610 int text_height = font_list_.GetBaseline(); 610 int text_height = font_list_.GetBaseline();
611 if (!status_text_.empty()) 611 if (!status_text_.empty())
612 text_height += kVerticalTextPadding + status_font_list_.GetBaseline(); 612 text_height += kVerticalTextPadding + status_font_list_.GetBaseline();
613 return (height() - text_height) / 2; 613 return (height() - text_height) / 2;
614 } 614 }
615 615
616 void DownloadItemViewMd::DrawStatusText(gfx::Canvas* canvas) { 616 void DownloadItemViewMd::DrawStatusText(gfx::Canvas* canvas) {
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 SchedulePaint(); 1114 SchedulePaint();
1115 } 1115 }
1116 1116
1117 SkColor DownloadItemViewMd::GetTextColor() const { 1117 SkColor DownloadItemViewMd::GetTextColor() const {
1118 return GetTextColorForThemeProvider(GetThemeProvider()); 1118 return GetTextColorForThemeProvider(GetThemeProvider());
1119 } 1119 }
1120 1120
1121 SkColor DownloadItemViewMd::GetDimmedTextColor() const { 1121 SkColor DownloadItemViewMd::GetDimmedTextColor() const {
1122 return SkColorSetA(GetTextColor(), 0xC7); 1122 return SkColorSetA(GetTextColor(), 0xC7);
1123 } 1123 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | chrome/browser/ui/views/location_bar/bubble_icon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698