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

Unified Diff: chrome/browser/ui/views/app_list/win/app_list_win.cc

Issue 162753002: Center and change the aspect ratio for the experimental app list. [Win] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile Created 6 years, 10 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/ui/app_list/app_list_positioner.cc ('k') | ui/app_list/app_list_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/app_list/win/app_list_win.cc
diff --git a/chrome/browser/ui/views/app_list/win/app_list_win.cc b/chrome/browser/ui/views/app_list/win/app_list_win.cc
index f1a8f6e2b66172547c613f6d112427e048574cfe..1d127f5d938854bbbdbb4e60cc5b13b215d8fe56 100644
--- a/chrome/browser/ui/views/app_list/win/app_list_win.cc
+++ b/chrome/browser/ui/views/app_list/win/app_list_win.cc
@@ -4,8 +4,10 @@
#include "chrome/browser/ui/views/app_list/win/app_list_win.h"
+#include "base/command_line.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_positioner.h"
+#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/views/app_list_view.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
@@ -61,6 +63,12 @@ gfx::Point AppListWin::FindAnchorPoint(const gfx::Size& view_size,
// never overlap the taskbar.
positioner.WorkAreaSubtract(taskbar_rect);
+ // The experimental app list is placed in the center of the screen.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ app_list::switches::kEnableExperimentalAppList)) {
+ return positioner.GetAnchorPointForScreenCenter();
+ }
+
// Find which edge of the screen the taskbar is attached to.
AppListPositioner::ScreenEdge edge = positioner.GetShelfEdge(taskbar_rect);
« no previous file with comments | « chrome/browser/ui/app_list/app_list_positioner.cc ('k') | ui/app_list/app_list_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698