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

Unified Diff: chrome/browser/ui/views/app_list/linux/app_list_linux.cc

Issue 253983002: Use centered app list position whenever virtual keyboard is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only change shape when keyboard enabled (not when it *might* be enabled). 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: chrome/browser/ui/views/app_list/linux/app_list_linux.cc
diff --git a/chrome/browser/ui/views/app_list/linux/app_list_linux.cc b/chrome/browser/ui/views/app_list/linux/app_list_linux.cc
index 87716c48a3ee569bed54df99a5b09a8a4ed44391..c0c1eee62475f650d230cd9d3a20143ebdc445bb 100644
--- a/chrome/browser/ui/views/app_list/linux/app_list_linux.cc
+++ b/chrome/browser/ui/views/app_list/linux/app_list_linux.cc
@@ -68,14 +68,16 @@ AppListPositioner::ScreenEdge AppListLinux::ShelfLocationInDisplay(
}
// static
-gfx::Point AppListLinux::FindAnchorPoint(const gfx::Size& view_size,
- const gfx::Display& display,
- const gfx::Point& cursor,
- AppListPositioner::ScreenEdge edge) {
+gfx::Point AppListLinux::FindAnchorPoint(
+ const gfx::Size& view_size,
+ const gfx::Display& display,
+ const gfx::Point& cursor,
+ AppListPositioner::ScreenEdge edge,
+ bool use_experimental_app_list_position) {
AppListPositioner positioner(display, view_size, 0);
// The experimental app list is placed in the center of the screen.
- if (app_list::switches::IsExperimentalAppListPositionEnabled())
+ if (use_experimental_app_list_position)
return positioner.GetAnchorPointForScreenCenter();
gfx::Point anchor;
@@ -132,7 +134,11 @@ void AppListLinux::MoveNearCursor() {
else
edge = ShelfLocationInDisplay(display);
view_->SetAnchorPoint(
- FindAnchorPoint(view_->GetPreferredSize(), display, cursor, edge));
+ FindAnchorPoint(view_->GetPreferredSize(),
+ display,
+ cursor,
+ edge,
+ view_->UseExperimentalAppListPosition()));
}
bool AppListLinux::IsVisible() {

Powered by Google App Engine
This is Rietveld 408576698