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

Unified Diff: ash/common/system/tray/hover_highlight_view.h

Issue 2264383002: More closely align palette to spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tool-magnifier
Patch Set: Add fs to icon numbers Created 4 years, 4 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
« no previous file with comments | « ash/common/system/chromeos/palette/palette_tray.cc ('k') | ash/common/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/hover_highlight_view.h
diff --git a/ash/common/system/tray/hover_highlight_view.h b/ash/common/system/tray/hover_highlight_view.h
index bdb3e64295d5be1994f0296b754c30b3af70f529..7f13fb6ce91b10ae057c032dc33f7e6fc66d2d02 100644
--- a/ash/common/system/tray/hover_highlight_view.h
+++ b/ash/common/system/tray/hover_highlight_view.h
@@ -38,11 +38,17 @@ class HoverHighlightView : public ActionableView {
bool highlight);
// Convenience function for adding an icon and a label. This also sets the
- // accessible name. The icon has an indent equal to
- // kTrayPopupPaddingHorizontal.
- void AddIndentedIconAndLabel(const gfx::ImageSkia& image,
- const base::string16& text,
- bool highlight);
+ // accessible name. This method allows the indent and spacing between elements
+ // to be set by the caller. |icon_size| is the size of the icon. |indent| is
+ // the distance between the edges of the view and the icons, and
+ // |space_between_items| is the minimum distance between any two child views.
+ // All distances are in DP.
+ void AddIconAndLabelCustomSize(const gfx::ImageSkia& image,
+ const base::string16& text,
+ bool highlight,
+ int icon_size,
+ int indent,
+ int space_between_items);
// Convenience function for adding a label with padding on the left for a
// blank icon. This also sets the accessible name. Returns label after
@@ -59,8 +65,8 @@ class HoverHighlightView : public ActionableView {
bool checked);
// Add an optional right icon to an already established view (call one of
- // the other Add* functions first).
- void AddRightIcon(const gfx::ImageSkia& image);
+ // the other Add* functions first). |icon_size| is the size of the icon in DP.
+ void AddRightIcon(const gfx::ImageSkia& image, int icon_size);
// Hide or show the right icon.
void SetRightIconVisible(bool visible);
@@ -94,6 +100,7 @@ class HoverHighlightView : public ActionableView {
private:
// Actually adds the icon and label but does not set the layout manager
void DoAddIconAndLabel(const gfx::ImageSkia& image,
+ int icon_size,
const base::string16& text,
bool highlight);
« no previous file with comments | « ash/common/system/chromeos/palette/palette_tray.cc ('k') | ash/common/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698