OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/app_list/views/folder_header_view.h" | 5 #include "ui/app_list/views/folder_header_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 const int kBottomSeparatorPadding = 9; // Non-experimental app list only. | 33 const int kBottomSeparatorPadding = 9; // Non-experimental app list only. |
34 const int kBottomSeparatorHeight = 1; | 34 const int kBottomSeparatorHeight = 1; |
35 const int kMaxFolderNameWidth = 300; | 35 const int kMaxFolderNameWidth = 300; |
36 | 36 |
37 } // namespace | 37 } // namespace |
38 | 38 |
39 class FolderHeaderView::FolderNameView : public views::Textfield { | 39 class FolderHeaderView::FolderNameView : public views::Textfield { |
40 public: | 40 public: |
41 FolderNameView() { | 41 FolderNameView() { |
42 SetBorder(views::Border::CreateEmptyBorder(1, 1, 1, 1)); | 42 SetBorder(views::Border::CreateEmptyBorder(1, 1, 1, 1)); |
43 const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250); | |
44 SetFocusPainter(views::Painter::CreateSolidFocusPainter( | |
45 kFocusBorderColor, | |
46 gfx::Insets(0, 0, 1, 1))); | |
47 | |
48 SetTextColor(kFolderTitleColor); | 43 SetTextColor(kFolderTitleColor); |
49 } | 44 } |
50 | 45 |
51 ~FolderNameView() override {} | 46 ~FolderNameView() override {} |
52 | 47 |
53 private: | 48 private: |
54 DISALLOW_COPY_AND_ASSIGN(FolderNameView); | 49 DISALLOW_COPY_AND_ASSIGN(FolderNameView); |
55 }; | 50 }; |
56 | 51 |
57 FolderHeaderView::FolderHeaderView(FolderHeaderViewDelegate* delegate) | 52 FolderHeaderView::FolderHeaderView(FolderHeaderViewDelegate* delegate) |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 void FolderHeaderView::ButtonPressed(views::Button* sender, | 241 void FolderHeaderView::ButtonPressed(views::Button* sender, |
247 const ui::Event& event) { | 242 const ui::Event& event) { |
248 delegate_->NavigateBack(folder_item_, event); | 243 delegate_->NavigateBack(folder_item_, event); |
249 } | 244 } |
250 | 245 |
251 void FolderHeaderView::ItemNameChanged() { | 246 void FolderHeaderView::ItemNameChanged() { |
252 Update(); | 247 Update(); |
253 } | 248 } |
254 | 249 |
255 } // namespace app_list | 250 } // namespace app_list |
OLD | NEW |