diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 16:11:54 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 16:11:54 +0000 |
commit | e667f718463a78b7d1de5a51e71982211f00f875 (patch) | |
tree | 463c36805d7dc65e05a62621eae528357e8a4430 /chrome/browser/autocomplete/autocomplete_popup_view_mac.h | |
parent | 1932c872cfeaceb7915d78133cd45d3058cc9bb4 (diff) | |
download | chromium_src-e667f718463a78b7d1de5a51e71982211f00f875.zip chromium_src-e667f718463a78b7d1de5a51e71982211f00f875.tar.gz chromium_src-e667f718463a78b7d1de5a51e71982211f00f875.tar.bz2 |
Various omnibox UI fixes:
* Truncate match contents to 70% of the available width, reserving 30% for the
description.
* Animate omnibox shrinkage.
BUG=14898
TEST=Omnibox should animate smaller, but not bigger/opened/closed. Match
description should always be partially visible, if present.
Review URL: http://codereview.chromium.org/173002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_popup_view_mac.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_view_mac.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h index c58328b..7c2b004 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h @@ -9,6 +9,7 @@ #include <string> +#include "app/gfx/font.h" #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "base/scoped_nsobject.h" @@ -24,6 +25,9 @@ class Profile; // Implements AutocompletePopupView using a raw NSWindow containing an // NSTableView. +// +// TODO(rohitrao): This class is set up in a way that makes testing hard. +// Refactor and write unittests. http://crbug.com/9977 class AutocompletePopupViewMac : public AutocompletePopupView { public: @@ -74,7 +78,8 @@ class AutocompletePopupViewMac : public AutocompletePopupView { // contents and description. Result will be in |font|, with the // boldfaced version used for matches. static NSAttributedString* MatchText(const AutocompleteMatch& match, - NSFont* font); + gfx::Font& font, + float cellWidth); // Helper for MatchText() to allow sharing code between the contents // and description cases. Returns NSMutableAttributedString as a @@ -82,7 +87,7 @@ class AutocompletePopupViewMac : public AutocompletePopupView { static NSMutableAttributedString* DecorateMatchedString( const std::wstring &matchString, const AutocompleteMatch::ACMatchClassifications &classifications, - NSColor* textColor, NSFont* font); + NSColor* textColor, gfx::Font& font); private: // Create the popup_ instance if needed. |