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

Unified Diff: ash/accelerators/exit_warning_handler.cc

Issue 341713002: Remove Label::PaintText overrides. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/sticky_keys/sticky_keys_overlay.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | ash/sticky_keys/sticky_keys_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698