Commit e5866060 authored by adinardi@chromium.org's avatar adinardi@chromium.org

Ignore button mouse enter for new tab button

The new tab button mouse enter is handled in the tab strip controller to ensure
an accurate hover indication (the button is an odd shape).

XIB Changes: Update the new tab button's cell class to the new NewTabButtonCell.

BUG=104326
TEST=Hover over the new tab button, it should light up. Hover slightly to the right of it, it shouldn't light up.


Review URL: http://codereview.chromium.org/8566036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110849 0039d316-1c4b-4281-b951-d872f2087c98
parent 8454aeb8
......@@ -285,7 +285,7 @@
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDk4AAwcgAAA</bytes>
</object>
<string>ImageButtonCell</string>
<string>NewTabButtonCell</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
......
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "chrome/browser/ui/cocoa/new_tab_button.h"
#import "chrome/browser/ui/cocoa/image_button_cell.h"
// A simple override of the ImageButtonCell to disable handling of
// -mouseEntered.
@interface NewTabButtonCell : ImageButtonCell
- (void)mouseEntered:(NSEvent*)theEvent;
@end
@implementation NewTabButtonCell
- (void)mouseEntered:(NSEvent*)theEvent {
// Ignore this since the NTB enter is handled by the TabStripController.
}
@end
@implementation NewTabButton
+ (Class)cellClass {
return [ImageButtonCell class];
return [NewTabButtonCell class];
}
// Approximate the shape. It doesn't need to be perfect. This will need to be
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment