Commit 3a0b95ce authored by sky@chromium.org's avatar sky@chromium.org

Revert 91758 - Display a tooltip when mouse hovers over a folder in the bookmark bar.

The tooltip is only displayed if the folder label is too wide for button which causes ellipsis to be displayed.
Views specific.

BUG=83838
TEST=Create a new folder with a long name in the bookmark bar and verifies the tooltip is displayed.


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

TBR=philippe.beaudoin@gmail.com
Review URL: http://codereview.chromium.org/7277094

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91760 0039d316-1c4b-4281-b951-d872f2087c98
parent 516f904e
...@@ -146,8 +146,7 @@ class BookmarkButton : public views::TextButton { ...@@ -146,8 +146,7 @@ class BookmarkButton : public views::TextButton {
} }
} }
virtual bool GetTooltipText(const gfx::Point& p, bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
std::wstring* tooltip) OVERRIDE {
gfx::Point location(p); gfx::Point location(p);
ConvertPointToScreen(this, &location); ConvertPointToScreen(this, &location);
*tooltip = BookmarkBarView::CreateToolTipForURLAndTitle(location, url_, *tooltip = BookmarkBarView::CreateToolTipForURLAndTitle(location, url_,
...@@ -196,13 +195,6 @@ class BookmarkFolderButton : public views::MenuButton { ...@@ -196,13 +195,6 @@ class BookmarkFolderButton : public views::MenuButton {
} }
} }
virtual bool GetTooltipText(const gfx::Point& p,
std::wstring* tooltip) OVERRIDE {
if (text_size_.width() > GetTextBounds().width())
*tooltip = text_;
return !tooltip->empty();
}
virtual bool IsTriggerableEvent(const views::MouseEvent& e) OVERRIDE { virtual bool IsTriggerableEvent(const views::MouseEvent& e) OVERRIDE {
// Left clicks should show the menu contents and right clicks should show // Left clicks should show the menu contents and right clicks should show
// the context menu. They should not trigger the opening of underlying urls. // the context menu. They should not trigger the opening of underlying urls.
......
...@@ -298,7 +298,7 @@ class BookmarkBarView : public DetachableToolbarView, ...@@ -298,7 +298,7 @@ class BookmarkBarView : public DetachableToolbarView,
// Creates the button for rendering the specified bookmark node. // Creates the button for rendering the specified bookmark node.
views::View* CreateBookmarkButton(const BookmarkNode* node); views::View* CreateBookmarkButton(const BookmarkNode* node);
// Configures the button from the specified node. This sets the text, // COnfigures the button from the specified node. This sets the text,
// and icon. // and icon.
void ConfigureButton(const BookmarkNode* node, views::TextButton* button); void ConfigureButton(const BookmarkNode* node, views::TextButton* button);
......
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