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

Unified Diff: ash/common/system/chromeos/tray_caps_lock.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/chromeos/settings/tray_settings.cc ('k') | ash/common/system/chromeos/tray_tracing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/tray_caps_lock.cc
diff --git a/ash/common/system/chromeos/tray_caps_lock.cc b/ash/common/system/chromeos/tray_caps_lock.cc
index 337dddfb06c7cacb624567f0c9c9fa3942622d94..f0b91aa9a6edb8488c81e000c5b99f331807ed8e 100644
--- a/ash/common/system/chromeos/tray_caps_lock.cc
+++ b/ash/common/system/chromeos/tray_caps_lock.cc
@@ -9,6 +9,7 @@
#include "ash/common/system/tray/fixed_sized_image_view.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
+#include "ash/common/system/tray/tray_popup_utils.h"
#include "ash/common/wm_shell.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "base/sys_info.h"
@@ -41,8 +42,8 @@ class CapsLockDefaultView : public ActionableView {
public:
CapsLockDefaultView()
: ActionableView(nullptr),
- text_label_(new views::Label),
- shortcut_label_(new views::Label) {
+ text_label_(TrayPopupUtils::CreateDefaultLabel()),
+ shortcut_label_(TrayPopupUtils::CreateDefaultLabel()) {
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
kTrayPopupPaddingHorizontal, 0,
kTrayPopupPaddingBetweenItems));
@@ -216,7 +217,8 @@ views::View* TrayCapsLock::CreateDetailedView(LoginStatus status) {
WmShell::Get()->system_tray_delegate()->IsSearchKeyMappedToCapsLock()
? IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_SEARCH
: IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_ALT_SEARCH;
- views::Label* label = new views::Label(bundle.GetLocalizedString(string_id));
+ views::Label* label = TrayPopupUtils::CreateDefaultLabel();
+ label->SetText(bundle.GetLocalizedString(string_id));
label->SetMultiLine(true);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
detailed_->AddChildView(label);
« no previous file with comments | « ash/common/system/chromeos/settings/tray_settings.cc ('k') | ash/common/system/chromeos/tray_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698