OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/app_list/views/tile_item_view.h" | 5 #include "ui/app_list/views/tile_item_view.h" |
6 | 6 |
7 #include "ui/app_list/app_list_constants.h" | 7 #include "ui/app_list/app_list_constants.h" |
8 #include "ui/app_list/app_list_features.h" | 8 #include "ui/app_list/app_list_features.h" |
9 #include "ui/app_list/views/app_list_main_view.h" | 9 #include "ui/app_list/views/app_list_main_view.h" |
10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 icon_->SetVerticalAlignment(views::ImageView::LEADING); | 59 icon_->SetVerticalAlignment(views::ImageView::LEADING); |
60 | 60 |
61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
62 title_->SetAutoColorReadabilityEnabled(false); | 62 title_->SetAutoColorReadabilityEnabled(false); |
63 title_->SetEnabledColor(kGridTitleColor); | 63 title_->SetEnabledColor(kGridTitleColor); |
64 title_->SetFontList(rb.GetFontList(kItemTextFontStyle)); | 64 title_->SetFontList(rb.GetFontList(kItemTextFontStyle)); |
65 title_->SetHorizontalAlignment(gfx::ALIGN_CENTER); | 65 title_->SetHorizontalAlignment(gfx::ALIGN_CENTER); |
66 title_->SetHandlesTooltips(false); | 66 title_->SetHandlesTooltips(false); |
67 | 67 |
68 AddChildView(icon_); | 68 AddChildView(icon_); |
69 if (features::IsFullscreenAppListEnabled()) { | 69 if (features::IsPlayStoreAppSearchEnabled()) { |
70 badge_ = new views::ImageView(); | 70 badge_ = new views::ImageView(); |
71 badge_->set_can_process_events_within_subtree(false); | 71 badge_->set_can_process_events_within_subtree(false); |
72 badge_->SetVerticalAlignment(views::ImageView::LEADING); | 72 badge_->SetVerticalAlignment(views::ImageView::LEADING); |
73 AddChildView(badge_); | 73 AddChildView(badge_); |
74 } | 74 } |
75 AddChildView(title_); | 75 AddChildView(title_); |
76 } | 76 } |
77 | 77 |
78 TileItemView::~TileItemView() = default; | 78 TileItemView::~TileItemView() = default; |
79 | 79 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // Tell the label what color it will be drawn onto. It will use whether the | 206 // Tell the label what color it will be drawn onto. It will use whether the |
207 // background color is opaque or transparent to decide whether to use subpixel | 207 // background color is opaque or transparent to decide whether to use subpixel |
208 // rendering. Does not actually set the label's background color. | 208 // rendering. Does not actually set the label's background color. |
209 title_->SetBackgroundColor(background_color); | 209 title_->SetBackgroundColor(background_color); |
210 | 210 |
211 SetBackground(std::move(background)); | 211 SetBackground(std::move(background)); |
212 SchedulePaint(); | 212 SchedulePaint(); |
213 } | 213 } |
214 | 214 |
215 } // namespace app_list | 215 } // namespace app_list |
OLD | NEW |