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

Unified Diff: chrome/browser/chromeos/login/user_view.cc

Issue 5966008: Show hand cursor only on small user pods and labels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use_small_shape is a constructor argument Created 9 years, 11 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 | « chrome/browser/chromeos/login/user_view.h ('k') | chrome/browser/chromeos/login/username_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_view.cc
diff --git a/chrome/browser/chromeos/login/user_view.cc b/chrome/browser/chromeos/login/user_view.cc
index e3592513fb054189dcc795af0ee970bf698aef20..250d71ba53394804d203996ac4834041a87e0781 100644
--- a/chrome/browser/chromeos/login/user_view.cc
+++ b/chrome/browser/chromeos/login/user_view.cc
@@ -214,7 +214,8 @@ class RemoveButton : public views::TextButton {
class PodImageView : public views::ImageView {
public:
- PodImageView() { }
+ explicit PodImageView(const UserView::Delegate* delegate)
+ : delegate_(delegate) { }
void SetImage(const SkBitmap& image, const SkBitmap& image_hot) {
image_ = image;
@@ -235,10 +236,12 @@ class PodImageView : public views::ImageView {
gfx::NativeCursor GetCursorForPoint(
views::Event::EventType event_type,
const gfx::Point& p) {
- return gfx::GetCursor(GDK_HAND2);
+ return (delegate_->IsUserSelected()) ? NULL : gfx::GetCursor(GDK_HAND2);
}
private:
+ const UserView::Delegate* delegate_;
+
SkBitmap image_;
SkBitmap image_hot_;
@@ -255,9 +258,9 @@ UserView::UserView(Delegate* delegate, bool is_login, bool need_background)
signout_view_ = new SignoutView(this);
if (need_background)
- image_view_ = new RoundedView<PodImageView>;
+ image_view_ = new RoundedView<PodImageView>(delegate);
else
- image_view_ = new PodImageView;
+ image_view_ = new PodImageView(delegate);
Init(need_background);
}
« no previous file with comments | « chrome/browser/chromeos/login/user_view.h ('k') | chrome/browser/chromeos/login/username_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698