diff options
Diffstat (limited to 'chrome/views/controls/button/text_button.cc')
-rw-r--r-- | chrome/views/controls/button/text_button.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/chrome/views/controls/button/text_button.cc b/chrome/views/controls/button/text_button.cc index a273d20..c5f1ae6 100644 --- a/chrome/views/controls/button/text_button.cc +++ b/chrome/views/controls/button/text_button.cc @@ -8,15 +8,12 @@ #include "chrome/common/l10n_util.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/throb_animation.h" +#include "chrome/common/win_util.h" #include "chrome/views/controls/button/button.h" #include "chrome/views/event.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" -#if defined(OS_WIN) -#include "chrome/common/win_util.h" -#endif - namespace views { // Padding between the icon and text. @@ -157,11 +154,11 @@ void TextButtonBorder::GetInsets(gfx::Insets* insets) const { TextButton::TextButton(ButtonListener* listener, const std::wstring& text) : CustomButton(listener), - alignment_(ALIGN_LEFT), font_(ResourceBundle::GetSharedInstance().GetFont( ResourceBundle::BaseFont)), color_(kEnabledColor), - max_width_(0) { + max_width_(0), + alignment_(ALIGN_LEFT) { SetText(text); set_border(new TextButtonBorder); SetAnimationDuration(kHoverAnimationDurationMs); @@ -247,16 +244,12 @@ void TextButton::Paint(ChromeCanvas* canvas, bool for_drag) { text_bounds.set_x(MirroredLeftPointForRect(text_bounds)); if (for_drag) { -#if defined(OS_WIN) - // TODO(erg): Either port DrawStringWithHalo to linux or find an - // alternative here. canvas->DrawStringWithHalo(text_, font_, color_, kHighlightColor, text_bounds.x(), text_bounds.y(), text_bounds.width(), text_bounds.height(), l10n_util::DefaultCanvasTextAlignment()); -#endif } else { // Draw bevel highlight canvas->DrawStringInt(text_, |