diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 15:34:32 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 15:34:32 +0000 |
commit | c1275b92a99f3e4163c3cc133132e983a424cc90 (patch) | |
tree | f271e81aa7f157d7328f30d8fd97c738e7cb22cc /chrome/browser/cocoa/hyperlink_button_cell.h | |
parent | a5f44c93e83cb964fa4c0529d6333f50ee5e73cf (diff) | |
download | chromium_src-c1275b92a99f3e4163c3cc133132e983a424cc90.zip chromium_src-c1275b92a99f3e4163c3cc133132e983a424cc90.tar.gz chromium_src-c1275b92a99f3e4163c3cc133132e983a424cc90.tar.bz2 |
[Mac] Create HyperlinkButtonCell and make the "Get themes" button an instance
* Creates a HyperlinkButtonCell that can be used in conjuction with a NSButton
to display the control as a hyperlink (blue underliend text), rather than
a normal Cocoa control.
* Switch the "Get themes..." button in Preferences to be one.
BUG=17989,21414
TEST=Preferences-->Personal Stuff, "Get themes..." is a hyperlink.
Review URL: http://codereview.chromium.org/248019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/hyperlink_button_cell.h')
-rw-r--r-- | chrome/browser/cocoa/hyperlink_button_cell.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/hyperlink_button_cell.h b/chrome/browser/cocoa/hyperlink_button_cell.h new file mode 100644 index 0000000..67b5c20 --- /dev/null +++ b/chrome/browser/cocoa/hyperlink_button_cell.h @@ -0,0 +1,21 @@ +// Copyright (c) 2009 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 <Cocoa/Cocoa.h> +#include "base/scoped_nsobject.h" + +// A HyperlinkButtonCell is used to create an NSButton that looks and acts +// like a hyperlink. The default styling is to look like blue, underlined text +// and to have the pointingHand cursor on mouse over. +// +// To use in Interface Builder: +// 1. Drag out an NSButton. +// 2. Double click on the button so you have the cell component selected. +// 3. In the Identity panel of the inspector, set the custom class to this. +@interface HyperlinkButtonCell : NSButtonCell { + scoped_nsobject<NSColor> textColor_; +} +@property (retain) NSColor* textColor; + +@end |