| Index: ash/common/system/chromeos/palette/palette_tray.cc
|
| diff --git a/ash/common/system/chromeos/palette/palette_tray.cc b/ash/common/system/chromeos/palette/palette_tray.cc
|
| index affb069a96ac98dc68c1b26ba55b27bc308c4e60..d2bccbee2c9bd066672aa7f912a7fde89a7a3740 100644
|
| --- a/ash/common/system/chromeos/palette/palette_tray.cc
|
| +++ b/ash/common/system/chromeos/palette/palette_tray.cc
|
| @@ -84,11 +84,13 @@ class TitleView : public views::View, public views::ButtonListener {
|
| new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
|
| SetLayoutManager(box_layout);
|
|
|
| - title_label_ =
|
| + auto title_label =
|
| new views::Label(l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_TITLE));
|
| - title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
|
| - AddChildView(title_label_);
|
| - box_layout->SetFlexForView(title_label_, 1);
|
| + title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
|
| + AddChildView(title_label);
|
| + TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::TITLE);
|
| + style.SetupLabel(title_label);
|
| + box_layout->SetFlexForView(title_label, 1);
|
| if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
|
| help_button_ =
|
| new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED,
|
| @@ -122,11 +124,6 @@ class TitleView : public views::View, public views::ButtonListener {
|
| ~TitleView() override {}
|
|
|
| private:
|
| - // views::View:
|
| - void OnNativeThemeChanged(const ui::NativeTheme* theme) override {
|
| - UpdateStyle();
|
| - }
|
| -
|
| // views::ButtonListener:
|
| void ButtonPressed(views::Button* sender, const ui::Event& event) override {
|
| if (sender == settings_button_) {
|
| @@ -144,18 +141,10 @@ class TitleView : public views::View, public views::ButtonListener {
|
| }
|
| }
|
|
|
| - void UpdateStyle() {
|
| - TrayPopupItemStyle style(GetNativeTheme(),
|
| - TrayPopupItemStyle::FontStyle::TITLE);
|
| - style.SetupLabel(title_label_);
|
| - }
|
| -
|
| // Unowned pointers to button views so we can determine which button was
|
| // clicked.
|
| views::View* settings_button_;
|
| views::View* help_button_;
|
| - // Needed for UpdateStyles()
|
| - views::Label* title_label_;
|
| PaletteTray* palette_tray_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TitleView);
|
|
|