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

Unified Diff: ui/views/controls/image_view.cc

Issue 11068012: Add new views::LabelButton and LabelButtonBorder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove stray semicolon. 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/image_view.h ('k') | ui/views/controls/label.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/image_view.cc
diff --git a/ui/views/controls/image_view.cc b/ui/views/controls/image_view.cc
index 3bee99cdaea28661fa905f0d268acb329bcaae0f..d27685b2d51fb03ce55048b5574446e3fb568556 100644
--- a/ui/views/controls/image_view.cc
+++ b/ui/views/controls/image_view.cc
@@ -16,7 +16,8 @@ namespace views {
ImageView::ImageView()
: image_size_set_(false),
horiz_alignment_(CENTER),
- vert_alignment_(CENTER) {
+ vert_alignment_(CENTER),
+ interactive_(true) {
}
ImageView::~ImageView() {
@@ -172,4 +173,8 @@ bool ImageView::GetTooltipText(const gfx::Point& p, string16* tooltip) const {
return true;
}
+bool ImageView::HitTestRect(const gfx::Rect& rect) const {
+ return interactive_ ? View::HitTestRect(rect) : false;
+}
+
} // namespace views
« no previous file with comments | « ui/views/controls/image_view.h ('k') | ui/views/controls/label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698