diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 17:39:43 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 17:39:43 +0000 |
commit | 839bc8027e57de37d22e893b0bd051361d0b0f2a (patch) | |
tree | 5314d8fb9f28a1924c8f92a8797bbbda4679e620 /ui | |
parent | 19aa91a8f725ef299841d21c0b343f3e2532aef7 (diff) | |
download | chromium_src-839bc8027e57de37d22e893b0bd051361d0b0f2a.zip chromium_src-839bc8027e57de37d22e893b0bd051361d0b0f2a.tar.gz chromium_src-839bc8027e57de37d22e893b0bd051361d0b0f2a.tar.bz2 |
Do not slide-up for the mouse click for the toast.
BUG=247796
R=dewittj@chromium.org
Review URL: https://chromiumcodereview.appspot.com/16675003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/message_center/views/message_popup_collection.cc | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc index 869243c..4acafda 100644 --- a/ui/message_center/views/message_popup_collection.cc +++ b/ui/message_center/views/message_popup_collection.cc @@ -203,32 +203,24 @@ void MessagePopupCollection::RepositionWidgetsWithTarget() { if (toasts_.empty()) return; - if (toasts_.back()->origin().y() > target_top_edge_) { - // No widgets are above, thus slides up the widgets. - int slide_length = - toasts_.back()->origin().y() - target_top_edge_; - for (Toasts::iterator iter = toasts_.begin(); - iter != toasts_.end(); ++iter) { - gfx::Rect bounds((*iter)->bounds()); - bounds.set_y(bounds.y() - slide_length); - (*iter)->SetBoundsWithAnimation(bounds); - } - } else { - Toasts::reverse_iterator iter = toasts_.rbegin(); - for (; iter != toasts_.rend(); ++iter) { - if ((*iter)->origin().y() > target_top_edge_) - break; - } - --iter; - int slide_length = target_top_edge_ - (*iter)->origin().y(); - for (; ; --iter) { - gfx::Rect bounds((*iter)->bounds()); - bounds.set_y(bounds.y() + slide_length); - (*iter)->SetBoundsWithAnimation(bounds); - - if (iter == toasts_.rbegin()) - break; - } + // No widgets above. + if (toasts_.back()->origin().y() > target_top_edge_) + return; + + Toasts::reverse_iterator iter = toasts_.rbegin(); + for (; iter != toasts_.rend(); ++iter) { + if ((*iter)->origin().y() > target_top_edge_) + break; + } + --iter; + int slide_length = target_top_edge_ - (*iter)->origin().y(); + for (; ; --iter) { + gfx::Rect bounds((*iter)->bounds()); + bounds.set_y(bounds.y() + slide_length); + (*iter)->SetBoundsWithAnimation(bounds); + + if (iter == toasts_.rbegin()) + break; } } |