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

Side by Side Diff: ash/accelerators/exit_warning_handler.cc

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)
Patch Set: respond to comments Created 3 years, 6 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 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/accelerators/exit_warning_handler.h" 5 #include "ash/accelerators/exit_warning_handler.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 rb.GetFontList(ui::ResourceBundle::LargeFont); 51 rb.GetFontList(ui::ResourceBundle::LargeFont);
52 text_width_ = gfx::GetStringWidth(text_, font_list); 52 text_width_ = gfx::GetStringWidth(text_, font_list);
53 SetPreferredSize( 53 SetPreferredSize(
54 gfx::Size(text_width_ + kHorizontalMarginAroundText, 54 gfx::Size(text_width_ + kHorizontalMarginAroundText,
55 font_list.GetHeight() + kVerticalMarginAroundText)); 55 font_list.GetHeight() + kVerticalMarginAroundText));
56 views::Label* label = new views::Label(); 56 views::Label* label = new views::Label();
57 label->SetText(text_); 57 label->SetText(text_);
58 label->SetHorizontalAlignment(gfx::ALIGN_CENTER); 58 label->SetHorizontalAlignment(gfx::ALIGN_CENTER);
59 label->SetFontList(font_list); 59 label->SetFontList(font_list);
60 label->SetEnabledColor(kTextColor); 60 label->SetEnabledColor(kTextColor);
61 label->SetDisabledColor(kTextColor);
62 label->SetAutoColorReadabilityEnabled(false); 61 label->SetAutoColorReadabilityEnabled(false);
63 label->SetSubpixelRenderingEnabled(false); 62 label->SetSubpixelRenderingEnabled(false);
64 AddChildView(label); 63 AddChildView(label);
65 SetLayoutManager(new views::FillLayout); 64 SetLayoutManager(new views::FillLayout);
66 } 65 }
67 66
68 void OnPaint(gfx::Canvas* canvas) override { 67 void OnPaint(gfx::Canvas* canvas) override {
69 cc::PaintFlags flags; 68 cc::PaintFlags flags;
70 flags.setStyle(cc::PaintFlags::kFill_Style); 69 flags.setStyle(cc::PaintFlags::kFill_Style);
71 flags.setColor(kWindowBackgroundColor); 70 flags.setColor(kWindowBackgroundColor);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 widget_->Show(); 160 widget_->Show();
162 161
163 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 162 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
164 } 163 }
165 164
166 void ExitWarningHandler::Hide() { 165 void ExitWarningHandler::Hide() {
167 widget_.reset(); 166 widget_.reset();
168 } 167 }
169 168
170 } // namespace ash 169 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/sticky_keys/sticky_keys_overlay.cc » ('j') | chrome/browser/ui/views/harmony/harmony_typography_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698