OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/views/tabs/tab.h" | 5 #include "chrome/browser/ui/views/tabs/tab.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/defaults.h" | 10 #include "chrome/browser/defaults.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "views/window/non_client_view.h" | 29 #include "views/window/non_client_view.h" |
30 #include "views/window/window.h" | 30 #include "views/window/window.h" |
31 | 31 |
32 static const int kLeftPadding = 16; | 32 static const int kLeftPadding = 16; |
33 static const int kTopPadding = 6; | 33 static const int kTopPadding = 6; |
34 static const int kRightPadding = 15; | 34 static const int kRightPadding = 15; |
35 static const int kBottomPadding = 5; | 35 static const int kBottomPadding = 5; |
36 static const int kDropShadowHeight = 2; | 36 static const int kDropShadowHeight = 2; |
37 static const int kToolbarOverlap = 1; | 37 static const int kToolbarOverlap = 1; |
38 static const int kFaviconTitleSpacing = 4; | 38 static const int kFaviconTitleSpacing = 4; |
39 static const int kTitleCloseButtonSpacing = 5; | 39 static const int kTitleCloseButtonSpacing = 3; |
40 static const int kStandardTitleWidth = 175; | 40 static const int kStandardTitleWidth = 175; |
41 static const int kCloseButtonVertFuzz = 0; | 41 static const int kCloseButtonVertFuzz = 0; |
42 static const int kCloseButtonHorzFuzz = 5; | 42 static const int kCloseButtonHorzFuzz = 5; |
43 | 43 |
44 // Vertical adjustment to the favicon when the tab has a large icon. | 44 // Vertical adjustment to the favicon when the tab has a large icon. |
45 static const int kAppTapFaviconVerticalAdjustment = 2; | 45 static const int kAppTapFaviconVerticalAdjustment = 2; |
46 | 46 |
47 // When a non-mini-tab becomes a mini-tab the width of the tab animates. If | 47 // When a non-mini-tab becomes a mini-tab the width of the tab animates. If |
48 // the width of a mini-tab is >= kMiniTabRendererAsNormalTabWidth then the tab | 48 // the width of a mini-tab is >= kMiniTabRendererAsNormalTabWidth then the tab |
49 // is rendered as a normal tab. This is done to avoid having the title | 49 // is rendered as a normal tab. This is done to avoid having the title |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 tab_active_.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); | 677 tab_active_.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); |
678 tab_active_.l_width = tab_active_.image_l->width(); | 678 tab_active_.l_width = tab_active_.image_l->width(); |
679 tab_active_.r_width = tab_active_.image_r->width(); | 679 tab_active_.r_width = tab_active_.image_r->width(); |
680 | 680 |
681 tab_inactive_.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); | 681 tab_inactive_.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); |
682 tab_inactive_.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); | 682 tab_inactive_.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); |
683 tab_inactive_.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); | 683 tab_inactive_.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); |
684 tab_inactive_.l_width = tab_inactive_.image_l->width(); | 684 tab_inactive_.l_width = tab_inactive_.image_l->width(); |
685 tab_inactive_.r_width = tab_inactive_.image_r->width(); | 685 tab_inactive_.r_width = tab_inactive_.image_r->width(); |
686 } | 686 } |
OLD | NEW |