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

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: Rename BorderImages and const image id arrays, etc. 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
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 af86d50f08862425469a9c09e4192924cea9637f..840497e7a802578f9463f8bb3345d41f0e0dd3ca 100644
--- a/ui/views/controls/button/text_button.h
+++ b/ui/views/controls/button/text_button.h
@@ -14,6 +14,7 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/custom_button.h"
+#include "ui/views/controls/button/border_images.h"
tfarina 2012/10/26 00:38:12 nit: sort
msw 2012/10/27 07:40:57 Done.
#include "ui/views/native_theme_delegate.h"
namespace views {
@@ -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_;

Powered by Google App Engine
This is Rietveld 408576698