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

Unified Diff: ash/launcher/launcher_view.cc

Issue 10824059: Fixees launcher tooltip animation settings and its finer visibility bugs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « ash/launcher/launcher_tooltip_manager.cc ('k') | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_view.cc
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 21b173b4d9c719669dcb2dca06c41847b5af5eee..d277ad05f45f7d7ede797f6b9f6e55d522122f5d 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -752,6 +752,11 @@ bool LauncherView::ShouldHideTooltip(const gfx::Point& cursor_location) {
if (child == overflow_button_)
continue;
+ // The tooltip shouldn't show over the app-list window.
+ if (child == GetAppListButtonView() &&
+ Shell::GetInstance()->GetAppListWindow())
+ continue;
+
gfx::Rect child_bounds = child->GetMirroredBounds();
active_bounds = active_bounds.Union(child_bounds);
}
@@ -954,13 +959,24 @@ void LauncherView::PointerReleasedOnButton(views::View* view,
}
void LauncherView::MouseMovedOverButton(views::View* view) {
+ // Mouse cursor moves doesn't make effects on the app-list button if
+ // app-list bubble is already visible.
+ if (view == GetAppListButtonView() &&
+ Shell::GetInstance()->GetAppListWindow())
+ return;
+
if (!tooltip_->IsVisible())
tooltip_->ResetTimer();
}
void LauncherView::MouseEnteredButton(views::View* view) {
+ // If mouse cursor enters to the app-list button but app-list bubble is
+ // already visible, we should not show the bubble in that case.
+ if (view == GetAppListButtonView() &&
+ Shell::GetInstance()->GetAppListWindow())
+ return;
+
if (tooltip_->IsVisible()) {
- tooltip_->Close();
tooltip_->ShowImmediately(view, GetAccessibleName(view));
} else {
tooltip_->ShowDelayed(view, GetAccessibleName(view));
@@ -1018,6 +1034,7 @@ void LauncherView::ButtonPressed(views::Button* sender,
if (view_index == -1)
return;
+ tooltip_->Close();
switch (model_->items()[view_index].type) {
case TYPE_TABBED:
case TYPE_APP_PANEL:
« no previous file with comments | « ash/launcher/launcher_tooltip_manager.cc ('k') | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698