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

Unified Diff: athena/home/athena_start_page_view.cc

Issue 583503003: Simply remove dummy app icons from the home card. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « athena/extensions/extension_app_model_builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/athena_start_page_view.cc
diff --git a/athena/home/athena_start_page_view.cc b/athena/home/athena_start_page_view.cc
index 40286782c52a1e861ae49ad1b46820f4ec29fdb4..098b141277c37b57e2bf3e1501b497a4215c4c2d 100644
--- a/athena/home/athena_start_page_view.cc
+++ b/athena/home/athena_start_page_view.cc
@@ -47,6 +47,11 @@ const int kSearchBoxCornerRadius = 2;
const int kSearchBoxWidth = kIconSize * 6 + kIconMargin * 7;
const int kSearchBoxHeight = 40;
+gfx::Size GetIconContainerSize() {
+ return gfx::Size(kIconSize * kMaxIconNum + kIconMargin * (kMaxIconNum - 1),
+ kIconSize);
+}
+
class PlaceHolderButton : public views::ImageButton,
public views::ButtonListener {
public:
@@ -208,7 +213,7 @@ AthenaStartPageView::AthenaStartPageView(
view_delegate->GetModel()->top_level_item_list();
for (size_t i = 0; i < std::min(top_level->item_count(), kMaxIconNum); ++i)
app_icon_container_->AddChildView(new AppIconButton(top_level->item_at(i)));
- app_icon_container_->SetSize(app_icon_container_->GetPreferredSize());
+ app_icon_container_->SetSize(GetIconContainerSize());
control_icon_container_ = new views::View();
control_icon_container_->SetPaintToLayer(true);
@@ -218,7 +223,7 @@ AthenaStartPageView::AthenaStartPageView(
views::BoxLayout::kHorizontal, 0, 0, kIconMargin));
for (size_t i = 0; i < kMaxIconNum; ++i)
control_icon_container_->AddChildView(new PlaceHolderButton());
- control_icon_container_->SetSize(control_icon_container_->GetPreferredSize());
+ control_icon_container_->SetSize(GetIconContainerSize());
search_box_view_ = new app_list::SearchBoxView(this, view_delegate);
search_box_view_->set_contents_view(this);
« no previous file with comments | « athena/extensions/extension_app_model_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698