summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 15:36:03 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 15:36:03 +0000
commit3da0bfd1d9974b55d3358aad5954836e9986ef4b (patch)
treefbe33a78ca5f6aba01b5544516c66c17953d6552 /views/controls
parenta20720983ddc7796ba3b93b3e57be2e5ba7f31a5 (diff)
downloadchromium_src-3da0bfd1d9974b55d3358aad5954836e9986ef4b.zip
chromium_src-3da0bfd1d9974b55d3358aad5954836e9986ef4b.tar.gz
chromium_src-3da0bfd1d9974b55d3358aad5954836e9986ef4b.tar.bz2
Changes the tab close button to a dot, unless you're near the button
or the tab is selected. I'm not to keen on the mouse near names, if you have better ideas please say so. BUG=45743 TEST=none Review URL: http://codereview.chromium.org/2796006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49795 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,