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

Side by Side Diff: ash/common/system/chromeos/tray_tracing.cc

Issue 2468173003: Fixed ugly text in the material design system menu. (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/tray_tracing.h" 5 #include "ash/common/system/chromeos/tray_tracing.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/metrics/user_metrics_action.h" 8 #include "ash/common/metrics/user_metrics_action.h"
9 #include "ash/common/system/tray/actionable_view.h" 9 #include "ash/common/system/tray/actionable_view.h"
10 #include "ash/common/system/tray/fixed_sized_image_view.h" 10 #include "ash/common/system/tray/fixed_sized_image_view.h"
11 #include "ash/common/system/tray/system_tray.h" 11 #include "ash/common/system/tray/system_tray.h"
12 #include "ash/common/system/tray/system_tray_controller.h" 12 #include "ash/common/system/tray/system_tray_controller.h"
13 #include "ash/common/system/tray/system_tray_notifier.h" 13 #include "ash/common/system/tray/system_tray_notifier.h"
14 #include "ash/common/system/tray/tray_constants.h" 14 #include "ash/common/system/tray/tray_constants.h"
15 #include "ash/common/system/tray/tray_popup_item_style.h" 15 #include "ash/common/system/tray/tray_popup_item_style.h"
16 #include "ash/common/system/tray/tray_popup_utils.h"
16 #include "ash/common/wm_shell.h" 17 #include "ash/common/wm_shell.h"
17 #include "grit/ash_resources.h" 18 #include "grit/ash_resources.h"
18 #include "grit/ash_strings.h" 19 #include "grit/ash_strings.h"
19 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/gfx/image/image.h" 21 #include "ui/gfx/image/image.h"
21 #include "ui/gfx/paint_vector_icon.h" 22 #include "ui/gfx/paint_vector_icon.h"
22 #include "ui/gfx/vector_icons_public.h" 23 #include "ui/gfx/vector_icons_public.h"
23 #include "ui/views/controls/image_view.h" 24 #include "ui/views/controls/image_view.h"
24 #include "ui/views/controls/label.h" 25 #include "ui/views/controls/label.h"
25 #include "ui/views/layout/box_layout.h" 26 #include "ui/views/layout/box_layout.h"
(...skipping 11 matching lines...) Expand all
37 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 38 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
38 image_ = 39 image_ =
39 new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT)); 40 new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT));
40 if (!MaterialDesignController::UseMaterialDesignSystemIcons()) { 41 if (!MaterialDesignController::UseMaterialDesignSystemIcons()) {
41 // The icon doesn't change in non-md. 42 // The icon doesn't change in non-md.
42 image_->SetImage( 43 image_->SetImage(
43 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_TRACING).ToImageSkia()); 44 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_TRACING).ToImageSkia());
44 } 45 }
45 AddChildView(image_); 46 AddChildView(image_);
46 47
47 label_ = new views::Label(); 48 label_ = TrayPopupUtils::CreateDefaultLabel();
48 label_->SetMultiLine(true); 49 label_->SetMultiLine(true);
49 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
50 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_TRACING)); 50 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_TRACING));
51 AddChildView(label_); 51 AddChildView(label_);
52 52
53 if (MaterialDesignController::IsSystemTrayMenuMaterial()) 53 if (MaterialDesignController::IsSystemTrayMenuMaterial())
54 SetInkDropMode(InkDropHostView::InkDropMode::ON); 54 SetInkDropMode(InkDropHostView::InkDropMode::ON);
55 } 55 }
56 56
57 ~DefaultTracingView() override {} 57 ~DefaultTracingView() override {}
58 58
59 private: 59 private:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 default_ = NULL; 128 default_ = NULL;
129 } 129 }
130 130
131 void TrayTracing::DestroyDetailedView() {} 131 void TrayTracing::DestroyDetailedView() {}
132 132
133 void TrayTracing::OnTracingModeChanged(bool value) { 133 void TrayTracing::OnTracingModeChanged(bool value) {
134 SetTrayIconVisible(value); 134 SetTrayIconVisible(value);
135 } 135 }
136 136
137 } // namespace ash 137 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/tray_caps_lock.cc ('k') | ash/common/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698