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

Side by Side Diff: ash/common/system/tray/tray_item_more.cc

Issue 2362443002: Removed font style application in TrayItemMore::ViewHierarchyChanged(). (Closed)
Patch Set: Removed style application from TrayItemMore::ViewHierarchyChanged(). Created 4 years, 3 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 | « ash/common/system/tray/tray_item_more.h ('k') | no next file » | 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 #include "ash/common/system/tray/tray_item_more.h" 5 #include "ash/common/system/tray/tray_item_more.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/tray/fixed_sized_image_view.h" 8 #include "ash/common/system/tray/fixed_sized_image_view.h"
9 #include "ash/common/system/tray/system_tray_item.h" 9 #include "ash/common/system/tray/system_tray_item.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE) 49 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE)
50 .ToImageSkia()); 50 .ToImageSkia());
51 } 51 }
52 AddChildView(more_); 52 AddChildView(more_);
53 } 53 }
54 } 54 }
55 55
56 TrayItemMore::~TrayItemMore() {} 56 TrayItemMore::~TrayItemMore() {}
57 57
58 void TrayItemMore::SetLabel(const base::string16& label) { 58 void TrayItemMore::SetLabel(const base::string16& label) {
59 label_->SetText(label); 59 label_->SetText(label);
tdanderson 2016/09/21 19:27:59 Do you want to call UpdateStyle() here and/or befo
bruthig 2016/09/21 19:37:10 Negative. I would possibly want to apply the styl
60 Layout(); 60 Layout();
61 SchedulePaint(); 61 SchedulePaint();
62 } 62 }
63 63
64 void TrayItemMore::SetImage(const gfx::ImageSkia& image_skia) { 64 void TrayItemMore::SetImage(const gfx::ImageSkia& image_skia) {
65 icon_->SetImage(image_skia); 65 icon_->SetImage(image_skia);
66 SchedulePaint(); 66 SchedulePaint();
67 } 67 }
68 68
69 void TrayItemMore::SetAccessibleName(const base::string16& name) { 69 void TrayItemMore::SetAccessibleName(const base::string16& name) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 label_->SetBoundsRect(bounds); 109 label_->SetBoundsRect(bounds);
110 } 110 }
111 } 111 }
112 112
113 void TrayItemMore::GetAccessibleState(ui::AXViewState* state) { 113 void TrayItemMore::GetAccessibleState(ui::AXViewState* state) {
114 ActionableView::GetAccessibleState(state); 114 ActionableView::GetAccessibleState(state);
115 if (!accessible_name_.empty()) 115 if (!accessible_name_.empty())
116 state->name = accessible_name_; 116 state->name = accessible_name_;
117 } 117 }
118 118
119 void TrayItemMore::ViewHierarchyChanged(
120 const ViewHierarchyChangedDetails& details) {
121 ActionableView::ViewHierarchyChanged(details);
122
123 if (details.is_add && details.child == this)
124 UpdateStyle();
125 }
126
127 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { 119 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) {
128 ActionableView::OnNativeThemeChanged(theme); 120 ActionableView::OnNativeThemeChanged(theme);
129 UpdateStyle(); 121 UpdateStyle();
130 } 122 }
131 123
132 } // namespace ash 124 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_item_more.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698