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

Unified Diff: ui/views/controls/button/text_button.h

Issue 11262002: Merge TextButton and LabelButton border images util structs, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add friend tests, remove unused variable. Created 8 years, 2 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 | « ui/views/controls/button/label_button_border.cc ('k') | ui/views/controls/button/text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/text_button.h
diff --git a/ui/views/controls/button/text_button.h b/ui/views/controls/button/text_button.h
index 67574dd90c719137b9772856cb7e4598f18aeafd..1a0ffa62fe2b117b327c1a045b47864ddb8ffaca 100644
--- a/ui/views/controls/button/text_button.h
+++ b/ui/views/controls/button/text_button.h
@@ -13,6 +13,7 @@
#include "ui/gfx/font.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/border.h"
+#include "ui/views/controls/button/border_images.h"
#include "ui/views/controls/button/custom_button.h"
#include "ui/views/native_theme_delegate.h"
@@ -42,25 +43,10 @@ class VIEWS_EXPORT TextButtonBorder : public Border {
void copy_normal_set_to_hot_set() { set_normal_set(hot_set_); }
protected:
- struct BorderImageSet {
- const gfx::ImageSkia* top_left;
- const gfx::ImageSkia* top;
- const gfx::ImageSkia* top_right;
- const gfx::ImageSkia* left;
- const gfx::ImageSkia* center;
- const gfx::ImageSkia* right;
- const gfx::ImageSkia* bottom_left;
- const gfx::ImageSkia* bottom;
- const gfx::ImageSkia* bottom_right;
- };
-
- void Paint(const View& view,
- gfx::Canvas* canvas,
- const BorderImageSet& set) const;
+ void set_normal_set(const BorderImages& set) { normal_set_ = set; }
+ void set_hot_set(const BorderImages& set) { hot_set_ = set; }
+ void set_pushed_set(const BorderImages& set) { pushed_set_ = set; }
- void set_normal_set(const BorderImageSet& set) { normal_set_ = set; }
- void set_hot_set(const BorderImageSet& set) { hot_set_ = set; }
- void set_pushed_set(const BorderImageSet& set) { pushed_set_ = set; }
void set_vertical_padding(int vertical_padding) {
vertical_padding_ = vertical_padding;
}
@@ -70,9 +56,9 @@ class VIEWS_EXPORT TextButtonBorder : public Border {
virtual void Paint(const View& view, gfx::Canvas* canvas) const OVERRIDE;
virtual void GetInsets(gfx::Insets* insets) const OVERRIDE;
- BorderImageSet normal_set_;
- BorderImageSet hot_set_;
- BorderImageSet pushed_set_;
+ BorderImages normal_set_;
+ BorderImages hot_set_;
+ BorderImages pushed_set_;
int vertical_padding_;
« no previous file with comments | « ui/views/controls/button/label_button_border.cc ('k') | ui/views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698