Index: ui/views/controls/button/text_button.cc |
=================================================================== |
--- ui/views/controls/button/text_button.cc (revision 236640) |
+++ ui/views/controls/button/text_button.cc (working copy) |
@@ -78,6 +78,10 @@ |
return insets_; |
} |
+gfx::Size TextButtonBorder::GetMinimumSize() const { |
+ return gfx::Size(); |
+} |
+ |
void TextButtonBorder::SetInsets(const gfx::Insets& insets) { |
insets_ = insets; |
} |
@@ -135,7 +139,18 @@ |
} |
} |
+gfx::Size TextButtonDefaultBorder::GetMinimumSize() const { |
+ gfx::Size size; |
+ if (normal_painter_) |
+ size.SetToMax(normal_painter_->GetMinimumSize()); |
+ if (hot_painter_) |
+ size.SetToMax(hot_painter_->GetMinimumSize()); |
+ if (pushed_painter_) |
+ size.SetToMax(pushed_painter_->GetMinimumSize()); |
+ return size; |
+} |
+ |
// TextButtonNativeThemeBorder ------------------------------------------------ |
TextButtonNativeThemeBorder::TextButtonNativeThemeBorder( |