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

Unified Diff: chrome/browser/cocoa/tab_controller.mm

Issue 3204007: Make tabOverlap dynamic depending on the number of non-mini tabs presented on... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/tab_controller.h ('k') | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_controller.mm
===================================================================
--- chrome/browser/cocoa/tab_controller.mm (revision 57038)
+++ chrome/browser/cocoa/tab_controller.mm (working copy)
@@ -144,6 +144,11 @@
}
}
+- (BOOL)hovered {
+ TabView* tabView = static_cast<TabView*>([self view]);
+ return [tabView isMouseIn];
+}
+
- (void)setTitle:(NSString*)title {
[[self view] setToolTip:title];
if ([self mini] && ![self selected]) {
@@ -222,7 +227,7 @@
// Returns YES if we should be showing the close button. The selected tab
// always shows the close button.
- (BOOL)shouldShowCloseButton {
- if ([self mini])
+ if ([self mini] || (![self selected] && [self hovered]))
return NO;
return ([self selected] || [self iconCapacity] >= 3);
}
« no previous file with comments | « chrome/browser/cocoa/tab_controller.h ('k') | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698