OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/common/wm/overview/window_selector.h" | 5 #include "ash/common/wm/overview/window_selector.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 bundle.GetFontList(kTextFilterFontStyle).GetHeight()); | 196 bundle.GetFontList(kTextFilterFontStyle).GetHeight()); |
197 DCHECK(text_height); | 197 DCHECK(text_height); |
198 const int vertical_padding = (params.bounds.height() - text_height) / 2; | 198 const int vertical_padding = (params.bounds.height() - text_height) / 2; |
199 views::BoxLayout* layout = new views::BoxLayout( | 199 views::BoxLayout* layout = new views::BoxLayout( |
200 views::BoxLayout::kHorizontal, kTextFilterHorizontalPadding, | 200 views::BoxLayout::kHorizontal, kTextFilterHorizontalPadding, |
201 vertical_padding, kTextFilterHorizontalPadding); | 201 vertical_padding, kTextFilterHorizontalPadding); |
202 container->SetLayoutManager(layout); | 202 container->SetLayoutManager(layout); |
203 | 203 |
204 views::Textfield* textfield = new views::Textfield; | 204 views::Textfield* textfield = new views::Textfield; |
205 textfield->set_controller(controller); | 205 textfield->set_controller(controller); |
206 textfield->SetBorder(views::Border::NullBorder()); | 206 textfield->SetBorder(views::NullBorder()); |
207 textfield->SetBackgroundColor(kTextFilterBackgroundColor); | 207 textfield->SetBackgroundColor(kTextFilterBackgroundColor); |
208 textfield->SetTextColor(kTextFilterTextColor); | 208 textfield->SetTextColor(kTextFilterTextColor); |
209 views::ImageView* image_view = new views::ImageView; | 209 views::ImageView* image_view = new views::ImageView; |
210 image_view->SetImage(image); | 210 image_view->SetImage(image); |
211 container->AddChildView(image_view); | 211 container->AddChildView(image_view); |
212 textfield->SetFontList(bundle.GetFontList(kTextFilterFontStyle)); | 212 textfield->SetFontList(bundle.GetFontList(kTextFilterFontStyle)); |
213 container->AddChildView(textfield); | 213 container->AddChildView(textfield); |
214 layout->SetFlexForView(textfield, 1); | 214 layout->SetFlexForView(textfield, 1); |
215 widget->SetContentsView(container); | 215 widget->SetContentsView(container); |
216 | 216 |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 for (size_t i = 0; i <= grid_list_.size() && | 676 for (size_t i = 0; i <= grid_list_.size() && |
677 grid_list_[selected_grid_index_]->Move(direction, animate); | 677 grid_list_[selected_grid_index_]->Move(direction, animate); |
678 i++) { | 678 i++) { |
679 selected_grid_index_ = | 679 selected_grid_index_ = |
680 (selected_grid_index_ + display_direction + grid_list_.size()) % | 680 (selected_grid_index_ + display_direction + grid_list_.size()) % |
681 grid_list_.size(); | 681 grid_list_.size(); |
682 } | 682 } |
683 } | 683 } |
684 | 684 |
685 } // namespace ash | 685 } // namespace ash |
OLD | NEW |