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 #import "ui/app_list/cocoa/app_list_pager_view.h" | 5 #import "ui/app_list/cocoa/app_list_pager_view.h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #include "skia/ext/skia_utils_mac.h" | 8 #include "skia/ext/skia_utils_mac.h" |
9 #include "ui/app_list/app_list_constants.h" | 9 #include "ui/app_list/app_list_constants.h" |
10 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 10 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 const CGFloat kButtonHeight = 6; | 14 const CGFloat kButtonHeight = 6; |
15 const CGFloat kButtonCornerRadius = 2; | 15 const CGFloat kButtonCornerRadius = 2; |
16 const CGFloat kButtonStripPadding = 20; | 16 const CGFloat kButtonStripPadding = 20; |
17 | 17 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 return; | 158 return; |
159 | 159 |
160 [gfx::SkColorToSRGBNSColor(app_list::kPagerSelectedColor) set]; | 160 [gfx::SkColorToSRGBNSColor(app_list::kPagerSelectedColor) set]; |
161 if (selectedRatio < 0) | 161 if (selectedRatio < 0) |
162 frame.origin.x += frame.size.width + frame.size.width * selectedRatio; | 162 frame.origin.x += frame.size.width + frame.size.width * selectedRatio; |
163 frame.size.width *= fabs(selectedRatio); | 163 frame.size.width *= fabs(selectedRatio); |
164 NSRectFill(frame); | 164 NSRectFill(frame); |
165 } | 165 } |
166 | 166 |
167 @end | 167 @end |
OLD | NEW |