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 "ash/system/tray/special_popup_row.h" | 5 #include "ash/system/tray/special_popup_row.h" |
6 | 6 |
7 #include "ash/system/tray/hover_highlight_view.h" | 7 #include "ash/system/tray/hover_highlight_view.h" |
8 #include "ash/system/tray/throbber_view.h" | 8 #include "ash/system/tray/throbber_view.h" |
9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
10 #include "ash/system/tray/tray_popup_header_button.h" | 10 #include "ash/system/tray/tray_popup_header_button.h" |
11 #include "grit/ash_resources.h" | 11 #include "grit/ash_resources.h" |
12 #include "grit/ash_strings.h" | 12 #include "grit/ash_strings.h" |
13 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
14 #include "ui/gfx/canvas.h" | 14 #include "ui/gfx/canvas.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 #include "ui/views/background.h" | 16 #include "ui/views/background.h" |
17 #include "ui/views/border.h" | 17 #include "ui/views/border.h" |
18 #include "ui/views/layout/box_layout.h" | 18 #include "ui/views/layout/box_layout.h" |
19 #include "ui/views/painter.h" | 19 #include "ui/views/painter.h" |
20 | 20 |
21 namespace ash { | 21 namespace ash { |
22 namespace internal { | |
23 | |
24 namespace { | 22 namespace { |
25 | 23 |
26 const int kIconPaddingLeft = 5; | 24 const int kIconPaddingLeft = 5; |
27 const int kSpecialPopupRowHeight = 55; | 25 const int kSpecialPopupRowHeight = 55; |
28 const int kBorderHeight = 1; | 26 const int kBorderHeight = 1; |
29 const SkColor kBorderColor = SkColorSetRGB(0xaa, 0xaa, 0xaa); | 27 const SkColor kBorderColor = SkColorSetRGB(0xaa, 0xaa, 0xaa); |
30 | 28 |
31 views::View* CreatePopupHeaderButtonsContainer() { | 29 views::View* CreatePopupHeaderButtonsContainer() { |
32 views::View* view = new views::View; | 30 views::View* view = new views::View; |
33 view->SetLayoutManager(new | 31 view->SetLayoutManager(new |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 gfx::Rect container_bounds = content_bounds; | 121 gfx::Rect container_bounds = content_bounds; |
124 container_bounds.ClampToCenteredSize(bounds.size()); | 122 container_bounds.ClampToCenteredSize(bounds.size()); |
125 container_bounds.set_x(content_bounds.width() - container_bounds.width()); | 123 container_bounds.set_x(content_bounds.width() - container_bounds.width()); |
126 button_container_->SetBoundsRect(container_bounds); | 124 button_container_->SetBoundsRect(container_bounds); |
127 | 125 |
128 bounds = content_->bounds(); | 126 bounds = content_->bounds(); |
129 bounds.set_width(button_container_->x()); | 127 bounds.set_width(button_container_->x()); |
130 content_->SetBoundsRect(bounds); | 128 content_->SetBoundsRect(bounds); |
131 } | 129 } |
132 | 130 |
133 } // namespace internal | |
134 } // namespace ash | 131 } // namespace ash |
OLD | NEW |