Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ui / app_list / views / app_list_background.cc
index b3a3ea3..509d01a 100644 (file)
@@ -54,7 +54,8 @@ void AppListBackground::Paint(gfx::Canvas* canvas,
 
   int contents_top = bounds.y();
   views::View* search_box_view = main_view_->search_box_view();
-  if (main_view_->visible() && search_box_view->visible()) {
+  if (main_view_->visible() && search_box_view->visible() &&
+      !app_list::switches::IsExperimentalAppListEnabled()) {
     const gfx::Rect search_box_view_bounds =
         search_box_view->ConvertRectToWidget(search_box_view->GetLocalBounds());
     gfx::Rect search_box_rect(bounds.x(),
@@ -86,19 +87,11 @@ void AppListBackground::Paint(gfx::Canvas* canvas,
       const gfx::Rect contents_view_view_bounds =
           contents_view->ConvertRectToWidget(contents_view->GetLocalBounds());
       gfx::Rect separator_rect(contents_rect);
-      // Extra kContentsSwitcherSeparatorHeight pixels so the launcher page
-      // indicator overlays the separator rect.
-      separator_rect.set_y(contents_view_view_bounds.bottom() +
-                           kContentsSwitcherSeparatorHeight);
+      separator_rect.Inset(
+          kExperimentalWindowPadding + main_view_->GetInsets().left(), 0);
+      separator_rect.set_y(contents_view_view_bounds.bottom() - 1);
       separator_rect.set_height(kBottomSeparatorSize);
       canvas->FillRect(separator_rect, kBottomSeparatorColor);
-      int contents_switcher_top = separator_rect.bottom();
-      gfx::Rect contents_switcher_rect(bounds.x(),
-                                       contents_switcher_top,
-                                       bounds.width(),
-                                       bounds.bottom() - contents_switcher_top);
-      paint.setColor(kContentsSwitcherBackgroundColor);
-      canvas->DrawRect(contents_switcher_rect, paint);
     }
   }