| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/window/custom_frame_view.h" | 5 #include "ui/views/window/custom_frame_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // In the window corners, the resize areas don't actually expand bigger, but the | 41 // In the window corners, the resize areas don't actually expand bigger, but the |
| 42 // 16 px at the end of each edge triggers diagonal resizing. | 42 // 16 px at the end of each edge triggers diagonal resizing. |
| 43 const int kResizeAreaCornerSize = 16; | 43 const int kResizeAreaCornerSize = 16; |
| 44 // The titlebar never shrinks too short to show the caption button plus some | 44 // The titlebar never shrinks too short to show the caption button plus some |
| 45 // padding below it. | 45 // padding below it. |
| 46 const int kCaptionButtonHeightWithPadding = 19; | 46 const int kCaptionButtonHeightWithPadding = 19; |
| 47 // The titlebar has a 2 px 3D edge along the top and bottom. | 47 // The titlebar has a 2 px 3D edge along the top and bottom. |
| 48 const int kTitlebarTopAndBottomEdgeThickness = 2; | 48 const int kTitlebarTopAndBottomEdgeThickness = 2; |
| 49 // The icon is inset 2 px from the left frame border. | 49 // The icon is inset 2 px from the left frame border. |
| 50 const int kIconLeftSpacing = 2; | 50 const int kIconLeftSpacing = 2; |
| 51 // The icon never shrinks below 16 px on a side. | |
| 52 const int kIconMinimumSize = 16; | |
| 53 // The space between the window icon and the title text. | 51 // The space between the window icon and the title text. |
| 54 const int kTitleIconOffsetX = 4; | 52 const int kTitleIconOffsetX = 4; |
| 55 // The space between the title text and the caption buttons. | 53 // The space between the title text and the caption buttons. |
| 56 const int kTitleCaptionSpacing = 5; | 54 const int kTitleCaptionSpacing = 5; |
| 57 | 55 |
| 56 #if !defined(OS_WIN) |
| 57 // The icon never shrinks below 16 px on a side. |
| 58 const int kIconMinimumSize = 16; |
| 59 #endif |
| 60 |
| 58 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
| 59 // Chrome OS uses a dark gray. | 62 // Chrome OS uses a dark gray. |
| 60 const SkColor kDefaultColorFrame = SkColorSetRGB(109, 109, 109); | 63 const SkColor kDefaultColorFrame = SkColorSetRGB(109, 109, 109); |
| 61 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(176, 176, 176); | 64 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(176, 176, 176); |
| 62 #else | 65 #else |
| 63 // Windows and Linux use a blue. | 66 // Windows and Linux use a blue. |
| 64 const SkColor kDefaultColorFrame = SkColorSetRGB(66, 116, 201); | 67 const SkColor kDefaultColorFrame = SkColorSetRGB(66, 116, 201); |
| 65 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(161, 182, 228); | 68 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(161, 182, 228); |
| 66 #endif | 69 #endif |
| 67 | 70 |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 } | 627 } |
| 625 case views::FRAME_BUTTON_CLOSE: { | 628 case views::FRAME_BUTTON_CLOSE: { |
| 626 button = close_button_; | 629 button = close_button_; |
| 627 break; | 630 break; |
| 628 } | 631 } |
| 629 } | 632 } |
| 630 return button; | 633 return button; |
| 631 } | 634 } |
| 632 | 635 |
| 633 } // namespace views | 636 } // namespace views |
| OLD | NEW |