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

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

Issue 23622020: Fixing the dynamic positioning (move with anchor) for the app launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit test Created 7 years, 3 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 a74e6e94d6af189403d8e084fd5f3b78d61dc7f9..5edd3f4d0b64b926fb371c5c256a87c42e87a4d5 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -89,7 +89,12 @@ void AppListView::InitAsBubble(gfx::NativeView parent,
OnSigninStatusChanged();
set_anchor_view(anchor);
- set_anchor_rect(gfx::Rect(anchor_point, gfx::Size()));
+ // In case an |anchor| is given we use the |anchor_point| as offset, otherwise
+ // we specify the |anchor_rect|.
+ if (anchor)
+ set_anchor_offset(anchor_point);
+ else
+ set_anchor_rect(gfx::Rect(anchor_point, gfx::Size()));
set_color(kContentsBackgroundColor);
set_margins(gfx::Insets());
set_move_with_anchor(true);
@@ -103,7 +108,7 @@ void AppListView::InitAsBubble(gfx::NativeView parent,
#if defined(USE_AURA) && defined(OS_WIN)
if (!ui::win::IsAeroGlassEnabled() ||
CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableDwmComposition)) {
+ switches::kDisableDwmComposition)) {
set_shadow(views::BubbleBorder::NO_SHADOW_OPAQUE_BORDER);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698