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

Unified Diff: ash/launcher/launcher_view.cc

Issue 13993027: ash: Update app list button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for #1 Created 7 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: ash/launcher/launcher_view.cc
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 810baed3b919cee40765668fe34e89e7d1930328..e324624711a07cf7b469f18447afdb9509e2d824 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -420,22 +420,7 @@ void LauncherView::OnShelfAlignmentChanged() {
UpdateFirstButtonPadding();
overflow_button_->OnShelfAlignmentChanged();
LayoutToIdealBounds();
- for (int i=0; i < view_model_->view_size(); ++i) {
- // TODO: remove when AppIcon is a Launcher Button.
- if (TYPE_APP_LIST == model_->items()[i].type) {
- ShelfLayoutManager* shelf = tooltip_->shelf_layout_manager();
- static_cast<AppListButton*>(view_model_->view_at(i))->SetImageAlignment(
- shelf->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_LEFT,
- views::ImageButton::ALIGN_RIGHT,
- views::ImageButton::ALIGN_CENTER),
- shelf->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_TOP,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_BOTTOM));
- }
+ for (int i = 0; i < view_model_->view_size(); ++i) {
if (i >= first_visible_index_ && i <= last_visible_index_)
view_model_->view_at(i)->Layout();
}
@@ -763,18 +748,6 @@ views::View* LauncherView::CreateViewForItem(const LauncherItem& item) {
case TYPE_APP_LIST: {
// TODO(dave): turn this into a LauncherButton too.
AppListButton* button = new AppListButton(this, this);
- ShelfLayoutManager* shelf = tooltip_->shelf_layout_manager();
- button->SetImageAlignment(
- shelf->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_LEFT,
- views::ImageButton::ALIGN_RIGHT,
- views::ImageButton::ALIGN_CENTER),
- shelf->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_TOP,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_BOTTOM));
view = button;
break;
}
« no previous file with comments | « ash/launcher/launcher_unittest.cc ('k') | ash/resources/default_100_percent/common/launcher/launcher_appmenu.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698