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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_controller.mm

Issue 11821002: mac: Tweak minimum tab width to match bitmap assets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | 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 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 [target_ commandDispatch:command forController:owner_]; 56 [target_ commandDispatch:command forController:owner_];
57 } 57 }
58 58
59 private: 59 private:
60 id<TabControllerTarget> target_; // weak 60 id<TabControllerTarget> target_; // weak
61 TabController* owner_; // weak, owns me 61 TabController* owner_; // weak, owns me
62 }; 62 };
63 63
64 } // TabControllerInternal namespace 64 } // TabControllerInternal namespace
65 65
66 // The min widths match the windows values and are sums of left + right 66 // The min widths is the smallest number at which the right edge of the right
67 // padding, of which we have no comparable constants (we draw using paths, not 67 // tab border image is not visibly clipped. It is a bit smaller than the sum
68 // images). The selected tab width includes the close button width. 68 // of the two tab edge bitmaps because these bitmaps have a few transparent
69 + (CGFloat)minTabWidth { return 31; } 69 // pixels on the side. The selected tab width includes the close button width.
70 + (CGFloat)minSelectedTabWidth { return 46; } 70 + (CGFloat)minTabWidth { return 35; }
71 + (CGFloat)minSelectedTabWidth { return 52; }
71 + (CGFloat)maxTabWidth { return 214; } 72 + (CGFloat)maxTabWidth { return 214; }
72 + (CGFloat)miniTabWidth { return 58; } 73 + (CGFloat)miniTabWidth { return 58; }
73 + (CGFloat)appTabWidth { return 66; } 74 + (CGFloat)appTabWidth { return 66; }
74 75
75 - (TabView*)tabView { 76 - (TabView*)tabView {
76 DCHECK([[self view] isKindOfClass:[TabView class]]); 77 DCHECK([[self view] isKindOfClass:[TabView class]]);
77 return static_cast<TabView*>([self view]); 78 return static_cast<TabView*>([self view]);
78 } 79 }
79 80
80 - (id)init { 81 - (id)init {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // TabStripDragController. 384 // TabStripDragController.
384 - (BOOL)tabCanBeDragged:(TabController*)controller { 385 - (BOOL)tabCanBeDragged:(TabController*)controller {
385 return [[target_ dragController] tabCanBeDragged:controller]; 386 return [[target_ dragController] tabCanBeDragged:controller];
386 } 387 }
387 388
388 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { 389 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab {
389 [[target_ dragController] maybeStartDrag:event forTab:tab]; 390 [[target_ dragController] maybeStartDrag:event forTab:tab];
390 } 391 }
391 392
392 @end 393 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698