| Index: ash/common/system/tray/tray_item_more.cc
|
| diff --git a/ash/common/system/tray/tray_item_more.cc b/ash/common/system/tray/tray_item_more.cc
|
| index 6d4fe55191bcf428fd06a196cbcf24986915adac..0e82407e304c0eed1f356e980c740adc4780e118 100644
|
| --- a/ash/common/system/tray/tray_item_more.cc
|
| +++ b/ash/common/system/tray/tray_item_more.cc
|
| @@ -8,6 +8,7 @@
|
| #include "ash/common/system/tray/fixed_sized_image_view.h"
|
| #include "ash/common/system/tray/system_tray_item.h"
|
| #include "ash/common/system/tray/tray_constants.h"
|
| +#include "ash/common/system/tray/tray_popup_item_style.h"
|
| #include "ash/resources/vector_icons/vector_icons.h"
|
| #include "grit/ash_resources.h"
|
| #include "ui/accessibility/ax_view_state.h"
|
| @@ -75,6 +76,15 @@ void TrayItemMore::ReplaceIcon(views::View* view) {
|
| AddChildViewAt(view, 0);
|
| }
|
|
|
| +void TrayItemMore::UpdateStyle() {
|
| + if (!MaterialDesignController::IsSystemTrayMenuMaterial())
|
| + return;
|
| +
|
| + TrayPopupItemStyle style(GetNativeTheme(),
|
| + TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL);
|
| + style.SetupLabel(label_);
|
| +}
|
| +
|
| bool TrayItemMore::PerformAction(const ui::Event& event) {
|
| if (!show_more_)
|
| return false;
|
| @@ -112,4 +122,17 @@ void TrayItemMore::GetAccessibleState(ui::AXViewState* state) {
|
| state->name = accessible_name_;
|
| }
|
|
|
| +void TrayItemMore::ViewHierarchyChanged(
|
| + const ViewHierarchyChangedDetails& details) {
|
| + ActionableView::ViewHierarchyChanged(details);
|
| +
|
| + if (details.is_add && details.child == this)
|
| + UpdateStyle();
|
| +}
|
| +
|
| +void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) {
|
| + ActionableView::OnNativeThemeChanged(theme);
|
| + UpdateStyle();
|
| +}
|
| +
|
| } // namespace ash
|
|
|