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 "chrome/browser/ui/gtk/browser_titlebar.h" | 5 #include "chrome/browser/ui/gtk/browser_titlebar.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 const int kNormalVerticalOffset = kTitlebarHeight + kTabOuterThickness; | 71 const int kNormalVerticalOffset = kTitlebarHeight + kTabOuterThickness; |
72 | 72 |
73 // A linux specific menu item for toggling window decorations. | 73 // A linux specific menu item for toggling window decorations. |
74 const int kShowWindowDecorationsCommand = 200; | 74 const int kShowWindowDecorationsCommand = 200; |
75 | 75 |
76 const int kAvatarBottomSpacing = 1; | 76 const int kAvatarBottomSpacing = 1; |
77 // There are 2 px on each side of the avatar (between the frame border and | 77 // There are 2 px on each side of the avatar (between the frame border and |
78 // it on the left, and between it and the tabstrip on the right). | 78 // it on the left, and between it and the tabstrip on the right). |
79 const int kAvatarSideSpacing = 2; | 79 const int kAvatarSideSpacing = 2; |
80 | 80 |
81 // The thickness of the custom frame border; we need it here to enlarge the | |
82 // close button whent the custom frame border isn't showing but the custom | |
83 // titlebar is showing. | |
84 const int kFrameBorderThickness = 4; | |
85 | |
86 // There is a 4px gap between the icon and the title text. | 81 // There is a 4px gap between the icon and the title text. |
87 const int kIconTitleSpacing = 4; | 82 const int kIconTitleSpacing = 4; |
88 | 83 |
89 // Padding around the icon when in app mode or popup mode. | 84 // Padding around the icon when in app mode or popup mode. |
90 const int kAppModePaddingTop = 5; | 85 const int kAppModePaddingTop = 5; |
91 const int kAppModePaddingBottom = 4; | 86 const int kAppModePaddingBottom = 4; |
92 const int kAppModePaddingLeft = 2; | 87 const int kAppModePaddingLeft = 2; |
93 | 88 |
94 // The left padding of the tab strip. In Views, the tab strip has a left | 89 // The left padding of the tab strip. In Views, the tab strip has a left |
95 // margin of FrameBorderThickness + kClientEdgeThickness. This offset is to | 90 // margin of FrameBorderThickness + kClientEdgeThickness. This offset is to |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 ui::SimpleMenuModel::Delegate* delegate) | 1095 ui::SimpleMenuModel::Delegate* delegate) |
1101 : SimpleMenuModel(delegate) { | 1096 : SimpleMenuModel(delegate) { |
1102 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); | 1097 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); |
1103 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); | 1098 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); |
1104 AddSeparator(ui::NORMAL_SEPARATOR); | 1099 AddSeparator(ui::NORMAL_SEPARATOR); |
1105 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 1100 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
1106 AddSeparator(ui::NORMAL_SEPARATOR); | 1101 AddSeparator(ui::NORMAL_SEPARATOR); |
1107 AddCheckItemWithStringId(kShowWindowDecorationsCommand, | 1102 AddCheckItemWithStringId(kShowWindowDecorationsCommand, |
1108 IDS_SHOW_WINDOW_DECORATIONS_MENU); | 1103 IDS_SHOW_WINDOW_DECORATIONS_MENU); |
1109 } | 1104 } |
OLD | NEW |