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

Side by Side Diff: ash/common/system/tray/tray_image_item.h

Issue 2455183002: Simplify layout of tray items and fix spacing for MD. (Closed)
Patch Set: tda review 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 unified diff | Download patch
« no previous file with comments | « ash/common/system/tray/system_tray.cc ('k') | ash/common/system/tray/tray_image_item.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 (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 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/system/tray/system_tray_item.h" 9 #include "ash/common/system/tray/system_tray_item.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // Sets the color of the material design icon to |color|. 40 // Sets the color of the material design icon to |color|.
41 void SetIconColor(SkColor color); 41 void SetIconColor(SkColor color);
42 42
43 // Changes the icon of the tray-view to the specified resource. 43 // Changes the icon of the tray-view to the specified resource.
44 // TODO(tdanderson): This is only used for non-material design, so remove it 44 // TODO(tdanderson): This is only used for non-material design, so remove it
45 // when material design is the default. See crbug.com/625692. 45 // when material design is the default. See crbug.com/625692.
46 void SetImageFromResourceId(int resource_id); 46 void SetImageFromResourceId(int resource_id);
47 47
48 private: 48 private:
49 // Set the alignment of the image depending on the shelf alignment.
50 void SetItemAlignment(ShelfAlignment alignment);
51
52 // Sets the current icon on |tray_view_|'s ImageView. 49 // Sets the current icon on |tray_view_|'s ImageView.
53 void UpdateImageOnImageView(); 50 void UpdateImageOnImageView();
54 51
55 // The resource ID for the non-material design icon in the tray. 52 // The resource ID for the non-material design icon in the tray.
56 // TODO(tdanderson): This is only used for non-material design, so remove it 53 // TODO(tdanderson): This is only used for non-material design, so remove it
57 // when material design is the default. See crbug.com/625692. 54 // when material design is the default. See crbug.com/625692.
58 int resource_id_; 55 int resource_id_;
59 56
60 // The color of the material design icon in the tray. 57 // The color of the material design icon in the tray.
61 SkColor icon_color_; 58 SkColor icon_color_;
62 59
63 TrayItemView* tray_view_; 60 TrayItemView* tray_view_;
64 61
65 DISALLOW_COPY_AND_ASSIGN(TrayImageItem); 62 DISALLOW_COPY_AND_ASSIGN(TrayImageItem);
66 }; 63 };
67 64
68 } // namespace ash 65 } // namespace ash
69 66
70 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ 67 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray.cc ('k') | ash/common/system/tray/tray_image_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698