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

Unified Diff: ash/common/system/chromeos/palette/common_palette_tool.cc

Issue 2502153002: Use correct fonts and add ripples to palette tray help/settings icon. (Closed)
Patch Set: Created 4 years, 1 month 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: ash/common/system/chromeos/palette/common_palette_tool.cc
diff --git a/ash/common/system/chromeos/palette/common_palette_tool.cc b/ash/common/system/chromeos/palette/common_palette_tool.cc
index 427d5d3d4771e9e75e4d568efc0e94099c2c5115..5e64c1d8d63bcd20919daf2a3cb4bb28d004e394 100644
--- a/ash/common/system/chromeos/palette/common_palette_tool.cc
+++ b/ash/common/system/chromeos/palette/common_palette_tool.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <ash/common/system/tray/tray_popup_item_style.h>
#include "ash/common/system/chromeos/palette/common_palette_tool.h"
#include "ash/common/shelf/shelf_constants.h"
@@ -24,13 +25,6 @@
namespace ash {
namespace {
-// Returns the font used by any displayed labels.
-const gfx::FontList& GetLabelFont() {
- // TODO(tdanderson|jdufault): Use TrayPopupItemStyle instead.
- return ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta(
- 1, gfx::Font::FontStyle::NORMAL, gfx::Font::Weight::MEDIUM);
-}
-
void AddHistogramTimes(PaletteToolId id, base::TimeDelta duration) {
if (id == PaletteToolId::LASER_POINTER) {
UMA_HISTOGRAM_CUSTOM_TIMES("Ash.Shelf.Palette.InLaserPointerMode", duration,
@@ -104,7 +98,9 @@ views::View* CommonPaletteTool::CreateDefaultView(const base::string16& name) {
kTrayPopupPaddingHorizontal);
highlight_view_->AddRightIcon(check, kMenuIconSize);
highlight_view_->set_custom_height(kMenuButtonSize);
- highlight_view_->text_label()->SetFontList(GetLabelFont());
+ TrayPopupItemStyle style(highlight_view_->GetNativeTheme(),
+ TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL);
+ style.SetupLabel(highlight_view_->text_label());
tdanderson 2016/11/16 20:44:16 Please move lines 101-103 into a helper called Upd
tdanderson 2016/11/16 20:51:03 Also, would be worth double-checking that after th
jdufault 2016/11/28 17:59:15 Removed this code, I think HoverHighlightView will
if (enabled()) {
highlight_view_->SetAccessiblityState(
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | ash/common/system/chromeos/palette/palette_tray.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698