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

Unified Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2661023006: Remove unused references to NativeTheme in TrayPopupItemStyle. (Closed)
Patch Set: slight improvement Created 3 years, 11 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
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);
« no previous file with comments | « ash/common/system/chromeos/network/vpn_list_view.cc ('k') | ash/common/system/chromeos/power/power_status_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698