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

Side by Side Diff: ash/common/wm/overview/window_selector.cc

Issue 2182633011: Replaces ::ui:: with ui:: in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/mus/accelerators/accelerator_registrar_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const int kTextFilterHeightMD = 40; 67 const int kTextFilterHeightMD = 40;
68 68
69 // Distance from top of overview to the top of text filtering textbox as a 69 // Distance from top of overview to the top of text filtering textbox as a
70 // proportion of the total overview area with Material Design. 70 // proportion of the total overview area with Material Design.
71 const float kTextFilterTopScreenProportion = 0.02f; 71 const float kTextFilterTopScreenProportion = 0.02f;
72 72
73 // Width of the text filter area with Material Design. 73 // Width of the text filter area with Material Design.
74 const int kTextFilterWidthMD = 280; 74 const int kTextFilterWidthMD = 280;
75 75
76 // The font style used for text filtering textbox. 76 // The font style used for text filtering textbox.
77 static const ::ui::ResourceBundle::FontStyle kTextFilterFontStyle = 77 static const ui::ResourceBundle::FontStyle kTextFilterFontStyle =
78 ::ui::ResourceBundle::FontStyle::MediumFont; 78 ui::ResourceBundle::FontStyle::MediumFont;
79 static const ::ui::ResourceBundle::FontStyle kTextFilterFontStyleMD = 79 static const ui::ResourceBundle::FontStyle kTextFilterFontStyleMD =
80 ::ui::ResourceBundle::FontStyle::BaseFont; 80 ui::ResourceBundle::FontStyle::BaseFont;
81 81
82 // The color of the text and its background in the text filtering textbox. 82 // The color of the text and its background in the text filtering textbox.
83 const SkColor kTextFilterTextColor = SK_ColorWHITE; 83 const SkColor kTextFilterTextColor = SK_ColorWHITE;
84 const SkColor kTextFilterTextColorMD = SkColorSetARGB(222, 0, 0, 0); 84 const SkColor kTextFilterTextColorMD = SkColorSetARGB(222, 0, 0, 0);
85 const SkColor kTextFilterBackgroundColor = SkColorSetARGB(180, 0, 0, 0); 85 const SkColor kTextFilterBackgroundColor = SkColorSetARGB(180, 0, 0, 0);
86 const SkColor kTextFilterBackgroundColorMD = SK_ColorWHITE; 86 const SkColor kTextFilterBackgroundColorMD = SK_ColorWHITE;
87 87
88 // The color or search icon with Material Design. 88 // The color or search icon with Material Design.
89 const SkColor kTextFilterIconColorMD = SkColorSetARGB(138, 0, 0, 0); 89 const SkColor kTextFilterIconColorMD = SkColorSetARGB(138, 0, 0, 0);
90 90
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 widget, kShellWindowId_StatusContainer, &params); 210 widget, kShellWindowId_StatusContainer, &params);
211 widget->Init(params); 211 widget->Init(params);
212 212
213 // Use |container| to specify the padding surrounding the text and to give 213 // Use |container| to specify the padding surrounding the text and to give
214 // the textfield rounded corners. 214 // the textfield rounded corners.
215 const bool material = ash::MaterialDesignController::IsOverviewMaterial(); 215 const bool material = ash::MaterialDesignController::IsOverviewMaterial();
216 views::View* container = new RoundedContainerView( 216 views::View* container = new RoundedContainerView(
217 material ? kTextFilterCornerRadiusMD : kTextFilterCornerRadius, 217 material ? kTextFilterCornerRadiusMD : kTextFilterCornerRadius,
218 material ? kTextFilterBackgroundColorMD : kTextFilterBackgroundColor); 218 material ? kTextFilterBackgroundColorMD : kTextFilterBackgroundColor);
219 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 219 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
220 const ::ui::ResourceBundle::FontStyle font_style = 220 const ui::ResourceBundle::FontStyle font_style =
221 material ? kTextFilterFontStyleMD : kTextFilterFontStyle; 221 material ? kTextFilterFontStyleMD : kTextFilterFontStyle;
222 const int text_height = 222 const int text_height =
223 std::max(kTextFilterIconSize, bundle.GetFontList(font_style).GetHeight()); 223 std::max(kTextFilterIconSize, bundle.GetFontList(font_style).GetHeight());
224 DCHECK(text_height); 224 DCHECK(text_height);
225 const int vertical_padding = (params.bounds.height() - text_height) / 2; 225 const int vertical_padding = (params.bounds.height() - text_height) / 2;
226 const int horizontal_padding = 226 const int horizontal_padding =
227 material ? kTextFilterHorizontalPaddingMD : kTextFilterHorizontalPadding; 227 material ? kTextFilterHorizontalPaddingMD : kTextFilterHorizontalPadding;
228 views::BoxLayout* layout = 228 views::BoxLayout* layout =
229 new views::BoxLayout(views::BoxLayout::kHorizontal, horizontal_padding, 229 new views::BoxLayout(views::BoxLayout::kHorizontal, horizontal_padding,
230 vertical_padding, horizontal_padding); 230 vertical_padding, horizontal_padding);
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 for (size_t i = 0; i <= grid_list_.size() && 708 for (size_t i = 0; i <= grid_list_.size() &&
709 grid_list_[selected_grid_index_]->Move(direction, animate); 709 grid_list_[selected_grid_index_]->Move(direction, animate);
710 i++) { 710 i++) {
711 selected_grid_index_ = 711 selected_grid_index_ =
712 (selected_grid_index_ + display_direction + grid_list_.size()) % 712 (selected_grid_index_ + display_direction + grid_list_.size()) %
713 grid_list_.size(); 713 grid_list_.size();
714 } 714 }
715 } 715 }
716 716
717 } // namespace ash 717 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/mus/accelerators/accelerator_registrar_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698