Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 7277089: Display a tooltip when mouse hovers over a folder in the bookmark bar. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
===================================================================
--- chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc (revision 91698)
+++ chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc (working copy)
@@ -146,7 +146,8 @@
}
}
- bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
+ virtual bool GetTooltipText(const gfx::Point& p,
+ std::wstring* tooltip) OVERRIDE {
gfx::Point location(p);
ConvertPointToScreen(this, &location);
*tooltip = BookmarkBarView::CreateToolTipForURLAndTitle(location, url_,
@@ -195,6 +196,13 @@
}
}
+ 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 {
// Left clicks should show the menu contents and right clicks should show
// the context menu. They should not trigger the opening of underlying urls.
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698