summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 20:10:16 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 20:10:16 +0000
commit7e7c82a55f155887f30816d30d54ce5e8d8f38c4 (patch)
tree0d4e6bad63be82a95570f068c4e425ce087841dd /views/controls
parent4110e83d3fa76393b865b078948a724f831f816b (diff)
downloadchromium_src-7e7c82a55f155887f30816d30d54ce5e8d8f38c4.zip
chromium_src-7e7c82a55f155887f30816d30d54ce5e8d8f38c4.tar.gz
chromium_src-7e7c82a55f155887f30816d30d54ce5e8d8f38c4.tar.bz2
Attempt 2 at:
Changes the tab close button to a dot, unless you're near the button or the tab is selected. The only difference between this and the first is that I missed a remove from the set if the view was deleted, which resulted in a crash. I've added an interactive test case that covers this. BUG=45743 TEST=none Review URL: http://codereview.chromium.org/2863003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/button/image_button.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/views/controls/button/image_button.h b/views/controls/button/image_button.h
index f65118a..c99c77f 100644
--- a/views/controls/button/image_button.h
+++ b/views/controls/button/image_button.h
@@ -18,6 +18,14 @@ namespace views {
class ImageButton : public CustomButton {
public:
+ enum HorizontalAlignment { ALIGN_LEFT = 0,
+ ALIGN_CENTER,
+ ALIGN_RIGHT, };
+
+ enum VerticalAlignment { ALIGN_TOP = 0,
+ ALIGN_MIDDLE,
+ ALIGN_BOTTOM };
+
explicit ImageButton(ButtonListener* listener);
virtual ~ImageButton();
@@ -29,13 +37,10 @@ class ImageButton : public CustomButton {
const SkBitmap* image,
const SkBitmap* mask);
- enum HorizontalAlignment { ALIGN_LEFT = 0,
- ALIGN_CENTER,
- ALIGN_RIGHT, };
-
- enum VerticalAlignment { ALIGN_TOP = 0,
- ALIGN_MIDDLE,
- ALIGN_BOTTOM };
+ // Explicitly sets the background image.
+ void set_background_image(const SkBitmap& background) {
+ background_image_ = background;
+ }
// Sets how the image is laid out within the button's bounds.
void SetImageAlignment(HorizontalAlignment h_align,