diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 00:46:49 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 00:46:49 +0000 |
commit | 110a4e7b14519e6b3771dd9c0501618ed45fc837 (patch) | |
tree | 75eeaa9ef1c7569a7aed2282895155f7234b2d15 /chrome/browser/cocoa/tab_controller.mm | |
parent | df5a4ffbb5531ca94bcf9b6a9825a99a3413c47b (diff) | |
download | chromium_src-110a4e7b14519e6b3771dd9c0501618ed45fc837.zip chromium_src-110a4e7b14519e6b3771dd9c0501618ed45fc837.tar.gz chromium_src-110a4e7b14519e6b3771dd9c0501618ed45fc837.tar.bz2 |
Reverting 24700.
Review URL: http://codereview.chromium.org/181002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24708 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/tab_controller.mm | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/chrome/browser/cocoa/tab_controller.mm b/chrome/browser/cocoa/tab_controller.mm index 96d7e5d..cff9f81 100644 --- a/chrome/browser/cocoa/tab_controller.mm +++ b/chrome/browser/cocoa/tab_controller.mm @@ -7,7 +7,6 @@ #import "chrome/browser/cocoa/tab_controller.h" #import "chrome/browser/cocoa/tab_controller_target.h" #import "chrome/browser/cocoa/tab_view.h" -#import "third_party/GTM/AppKit/GTMTheme.h" @interface TabController(Private) - (void)updateVisibility; @@ -54,7 +53,7 @@ selected_ = selected; [(TabView *)[self view] setState:selected]; [self updateVisibility]; - [self applyTheme]; + [[self view] setNeedsDisplay:YES]; } // Called when the tab's nib is done loading and all outlets are hooked up. @@ -62,6 +61,9 @@ // Ensure we don't show favicon if the tab is already too small to begin with. [self updateVisibility]; [(id)iconView_ setImage:nsimage_cache::ImageNamed(@"nav.pdf")]; + [[self view] addSubview:backgroundButton_ + positioned:NSWindowBelow + relativeTo:nil]; [self internalSetSelected:selected_]; } @@ -89,7 +91,7 @@ } - (void)setTitle:(NSString *)title { - [[self view] setToolTip:title]; + [backgroundButton_ setToolTip:title]; [super setTitle:title]; } @@ -117,7 +119,7 @@ } - (NSString *)toolTip { - return [[self view] toolTip]; + return [backgroundButton_ toolTip]; } // Return a rough approximation of the number of icons we could fit in the @@ -166,20 +168,4 @@ [self updateVisibility]; } -- (void)applyTheme { - GTMTheme* theme = [[self view] gtm_theme]; - NSColor* color = nil; - if (!selected_) { - color = [theme textColorForStyle:GTMThemeStyleTabBarDeselected - state:GTMThemeStateActiveWindow]; - } - // Default to the selected text color unless told otherwise. - if (!color) { - color = [theme textColorForStyle:GTMThemeStyleToolBar - state:GTMThemeStateActiveWindow]; - } - - [titleView_ setTextColor:color ? color : [NSColor textColor]]; - [[self view] setNeedsDisplay:YES]; -} @end |