Index: ash/accelerators/exit_warning_handler.cc |
diff --git a/ash/accelerators/exit_warning_handler.cc b/ash/accelerators/exit_warning_handler.cc |
index d2dc0f56a6266b6f8f81f03a6c876e9d829570bd..d01466b6662c87b02b9456fe32a440ef7c60439b 100644 |
--- a/ash/accelerators/exit_warning_handler.cc |
+++ b/ash/accelerators/exit_warning_handler.cc |
@@ -38,27 +38,6 @@ const int kWindowCornerRadius = 2; |
const int kHorizontalMarginAroundText = 100; |
const int kVerticalMarginAroundText = 100; |
-class ExitWarningLabel : public views::Label { |
- public: |
- ExitWarningLabel() {} |
- |
- virtual ~ExitWarningLabel() {} |
- |
- private: |
- virtual void PaintText(gfx::Canvas* canvas, |
- const base::string16& text, |
- const gfx::Rect& text_bounds, |
- int flags) OVERRIDE { |
- // Turn off subpixel rendering. |
- views::Label::PaintText(canvas, |
- text, |
- text_bounds, |
- flags | gfx::Canvas::NO_SUBPIXEL_RENDERING); |
- } |
- |
- DISALLOW_COPY_AND_ASSIGN(ExitWarningLabel); |
-}; |
- |
class ExitWarningWidgetDelegateView : public views::WidgetDelegateView { |
public: |
ExitWarningWidgetDelegateView() : text_width_(0), width_(0), height_(0) { |
@@ -77,13 +56,14 @@ class ExitWarningWidgetDelegateView : public views::WidgetDelegateView { |
text_width_ = gfx::GetStringWidth(text_, font_list); |
width_ = text_width_ + kHorizontalMarginAroundText; |
height_ = font_list.GetHeight() + kVerticalMarginAroundText; |
- views::Label* label = new ExitWarningLabel; |
+ views::Label* label = new views::Label(); |
label->SetText(text_); |
label->SetHorizontalAlignment(gfx::ALIGN_CENTER); |
label->SetFontList(font_list); |
label->SetEnabledColor(kTextColor); |
label->SetDisabledColor(kTextColor); |
label->SetAutoColorReadabilityEnabled(false); |
+ label->set_subpixel_rendering_enabled(false); |
AddChildView(label); |
SetLayoutManager(new views::FillLayout); |
} |