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

Side by Side Diff: ash/common/system/chromeos/palette/common_palette_tool.cc

Issue 2615263002: Reland cros: Small visual tweaks for material design palette. (Closed)
Patch Set: Fix compile Created 3 years, 11 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
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/common/system/chromeos/palette/common_palette_tool.h" 5 #include "ash/common/system/chromeos/palette/common_palette_tool.h"
6 6
7 #include "ash/common/shelf/shelf_constants.h" 7 #include "ash/common/shelf/shelf_constants.h"
8 #include "ash/common/system/chromeos/palette/palette_ids.h" 8 #include "ash/common/system/chromeos/palette/palette_ids.h"
9 #include "ash/common/system/chromeos/palette/palette_tool_manager.h" 9 #include "ash/common/system/chromeos/palette/palette_tool_manager.h"
10 #include "ash/common/system/tray/hover_highlight_view.h" 10 #include "ash/common/system/tray/hover_highlight_view.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 } 83 }
84 84
85 views::View* CommonPaletteTool::CreateDefaultView(const base::string16& name) { 85 views::View* CommonPaletteTool::CreateDefaultView(const base::string16& name) {
86 gfx::ImageSkia icon = 86 gfx::ImageSkia icon =
87 CreateVectorIcon(GetPaletteIcon(), kMenuIconSize, gfx::kChromeIconGrey); 87 CreateVectorIcon(GetPaletteIcon(), kMenuIconSize, gfx::kChromeIconGrey);
88 gfx::ImageSkia check = CreateVectorIcon(gfx::VectorIconId::CHECK_CIRCLE, 88 gfx::ImageSkia check = CreateVectorIcon(gfx::VectorIconId::CHECK_CIRCLE,
89 kMenuIconSize, gfx::kGoogleGreen700); 89 kMenuIconSize, gfx::kGoogleGreen700);
90 90
91 highlight_view_ = new HoverHighlightView(this); 91 highlight_view_ = new HoverHighlightView(this);
92 highlight_view_->SetBorder( 92 highlight_view_->SetBorder(views::CreateEmptyBorder(0, 0, 0, 0));
93 views::CreateEmptyBorder(0, kMenuExtraMarginFromLeftEdge, 0, 0));
94 const int interior_button_padding = (kMenuButtonSize - kMenuIconSize) / 2; 93 const int interior_button_padding = (kMenuButtonSize - kMenuIconSize) / 2;
95 highlight_view_->AddIconAndLabelCustomSize(icon, name, false, kMenuIconSize, 94 highlight_view_->AddIconAndLabelCustomSize(icon, name, false, kMenuIconSize,
96 interior_button_padding, 95 interior_button_padding,
97 kTrayPopupPaddingHorizontal); 96 kTrayPopupPaddingHorizontal);
98 highlight_view_->AddRightIcon(check, kMenuIconSize); 97 highlight_view_->AddRightIcon(check, kMenuIconSize);
99 highlight_view_->set_custom_height(kMenuButtonSize); 98 highlight_view_->set_custom_height(kMenuButtonSize);
100 99
101 if (enabled()) { 100 if (enabled()) {
102 highlight_view_->SetAccessiblityState( 101 highlight_view_->SetAccessiblityState(
103 HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX); 102 HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX);
104 } else { 103 } else {
105 highlight_view_->SetRightViewVisible(false); 104 highlight_view_->SetRightViewVisible(false);
106 highlight_view_->SetAccessiblityState( 105 highlight_view_->SetAccessiblityState(
107 HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); 106 HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX);
108 } 107 }
109 108
110 return highlight_view_; 109 return highlight_view_;
111 } 110 }
112 111
113 } // namespace ash 112 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698