Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 10829389: Fix tab-strip related constants to accommodate the new images. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/views/tabs/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windowsx.h> 8 #include <windowsx.h>
9 #endif 9 #endif
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 // Amount the left edge of a tab is offset from the rectangle of the tab's 140 // Amount the left edge of a tab is offset from the rectangle of the tab's
141 // favicon/title/close box. Related to the width of IDR_TAB_ACTIVE_LEFT. 141 // favicon/title/close box. Related to the width of IDR_TAB_ACTIVE_LEFT.
142 // Affects the size of the "V" between adjacent tabs. 142 // Affects the size of the "V" between adjacent tabs.
143 int tab_h_offset() { 143 int tab_h_offset() {
144 static int value = -1; 144 static int value = -1;
145 if (value == -1) { 145 if (value == -1) {
146 switch (ui::GetDisplayLayout()) { 146 switch (ui::GetDisplayLayout()) {
147 case ui::LAYOUT_ASH: 147 case ui::LAYOUT_ASH:
148 case ui::LAYOUT_DESKTOP: 148 case ui::LAYOUT_DESKTOP:
149 value = -29; 149 value = -26;
150 break; 150 break;
151 case ui::LAYOUT_TOUCH: 151 case ui::LAYOUT_TOUCH:
152 value = -39; 152 value = -39;
153 break; 153 break;
154 default: 154 default:
155 NOTREACHED(); 155 NOTREACHED();
156 } 156 }
157 } 157 }
158 return value; 158 return value;
159 } 159 }
(...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 2366
2367 int mini_tab_count = GetMiniTabCount(); 2367 int mini_tab_count = GetMiniTabCount();
2368 int normal_count = tab_count() - mini_tab_count; 2368 int normal_count = tab_count() - mini_tab_count;
2369 if (normal_count <= 1 || normal_count == mini_tab_count) 2369 if (normal_count <= 1 || normal_count == mini_tab_count)
2370 return false; 2370 return false;
2371 int x = GetStartXForNormalTabs(); 2371 int x = GetStartXForNormalTabs();
2372 int available_width = width() - x - new_tab_button_width(); 2372 int available_width = width() - x - new_tab_button_width();
2373 return (Tab::GetTouchWidth() * normal_count + 2373 return (Tab::GetTouchWidth() * normal_count +
2374 tab_h_offset() * (normal_count - 1)) > available_width; 2374 tab_h_offset() * (normal_count - 1)) > available_width;
2375 } 2375 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698