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

Unified Diff: ui/app_list/views/app_list_view.cc

Issue 250423004: ChromeOS: Avoid overlapping app list with virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid DEPS changes; use AppListViewDelegate instead. Created 6 years, 8 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
Index: ui/app_list/views/app_list_view.cc
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index 4924eb94504f515821c1d83c180ae4488c036d45..6d3f20a10b791cb245a0a4eec5aa11569d55b85d 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -360,6 +360,13 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent,
gfx::Point AppListView::GetCenterPoint() {
DCHECK(screen_to_keep_centered_on_);
gfx::Rect bounds = screen_to_keep_centered_on_->GetPrimaryDisplay().bounds();
tapted 2014/04/29 03:39:17 Can we just center in the WorkArea rather than bou
Matt Giuca 2014/04/29 05:51:35 Hmm... unfortunately it looks like the order is wr
tapted 2014/04/29 06:09:53 Drat. Maybe a short note here like // Can't use
Matt Giuca 2014/04/29 06:26:11 Done.
+
+ // If the virtual keyboard is active, subtract it from the display bounds, so
+ // that the app list is centered in the non-keyboard area of the display.
+ gfx::Rect keyboard_bounds = delegate_->GetVirtualKeyboardBounds();
+ if (!keyboard_bounds.IsEmpty())
+ bounds.Subtract(keyboard_bounds);
+
return bounds.CenterPoint();
}
« chrome/browser/ui/app_list/app_list_view_delegate.cc ('K') | « ui/app_list/views/app_list_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698