summaryrefslogtreecommitdiffstats
path: root/ui/views/widget/tooltip_manager.cc
Commit message (Collapse)AuthorAgeFilesLines
* Tooltip Cleanuposhima2015-02-191-24/+0
| | | | | | | | | | | | | | | This is prep for tooltip improvement: https://codereview.chromium.org/924433002/ (WIP) * Consolidated GetMaxWidth * Eliminate screen type argument. This can be obtained from tooltip window. * Move tooltip truncate code from TooltipManager to TooltipController BUG=None TEST=no functional change. all test should pass. Review URL: https://codereview.chromium.org/916423002 Cr-Commit-Position: refs/heads/master@{#317081}
* Cleanup: Update the path to gfx rect headers.tfarina2014-12-311-1/+1
| | | | | | | | | | | | | The geometry headers were moved from /ui/gfx/ to ui/gfx/geometry, so we are updating the include paths to fix this. BUG=395370 TEST=compiles TBR=sky@chromium.org,danakj@chromium.org Review URL: https://codereview.chromium.org/823133004 Cr-Commit-Position: refs/heads/master@{#309814}
* New avatar button: Consolidate text elision between Mac and Win/Linuxtreib@chromium.org2014-07-231-1/+1
| | | | | | | | | | | | This is a cleanup, as discussed in the comments of https://codereview.chromium.org/287103004/ This turned out to require extending gfx::TruncateString with an extra BreakType parameter; it now supports breaking within words as well as at word boundaries. All call sites have been updated accordingly. BUG=none Review URL: https://codereview.chromium.org/381953002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284933 0039d316-1c4b-4281-b951-d872f2087c98
* Makes tooltips work better with capturesky@chromium.org2013-10-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When capture is held all mouse events go to the captured window, even if another window happens to be under the mouse. This patch makes it so that when capture is held TooltipController looks for the window under the mouse and potentially queries it for the tooltip. If the window under the mouse differs from the captured window it is queried for the tooltip if the capture window and the window under the mouse have the same value for the window property TooltipManager::kGroupingPropertyKey. The only place that sets this value is menus. When a menu is shown only the first menu has capture. By picking up the tooltip from the other menus tooltips show correctly for nested menus. I also had to update TooltipManagerAura to similarly update the tooltip on the associated window when capture is held. BUG=310604 5246 311291 TEST=see bug R=varunjain@chromium.org Review URL: https://codereview.chromium.org/40403004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231452 0039d316-1c4b-4281-b951-d872f2087c98
* Wires up aura to using native tooltips on windows non-metrosky@chromium.org2013-10-051-6/+9
| | | | | | | | | | BUG=292738 TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/25415007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227180 0039d316-1c4b-4281-b951-d872f2087c98
* More tooltip related cleanupsky@chromium.org2013-10-021-45/+11
| | | | | | | | | | | | | | | | . Make font loopup go through instance method (rather than static). . Consolidate trimming tooltip code. . Expose TooltipManager on Widget and use it. . Move TrimTooltipToFit from TooltipManager to TooltipManagerWin (only place that needs it). . Make TooltipManager::GetMaxWidth() match that of aura. R=ben@chromium.org BUG=292738 Review URL: https://codereview.chromium.org/25744002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226602 0039d316-1c4b-4281-b951-d872f2087c98
* add missing #include of <algorithm>, needed on VS2013 for std::maxscottmg@chromium.org2013-09-121-0/+1
| | | | | | | | | R=sadrul@chromium.org BUG=288948 Review URL: https://chromiumcodereview.appspot.com/23619040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222875 0039d316-1c4b-4281-b951-d872f2087c98
* Move text_elider to gfx.ben@chromium.org2013-09-091-2/+2
| | | | | | | | | R=sky@chromium.org http://crbug.com/103304 Review URL: https://codereview.chromium.org/23731010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222106 0039d316-1c4b-4281-b951-d872f2087c98
* Clean-up: Replaces Font with FontList in TooltipManager.yukishiino@chromium.org2013-08-301-8/+5
| | | | | | | | | | | | | | | | | | This is a part of refactoring to replace all use of gfx::Font with gfx::FontList. Also this replacement solves a possible vertical alignment issue of text rendering. See "Background & Problem" section in the following doc why this refactoring is needed. https://docs.google.com/a/chromium.org/document/d/1D_25fp9B8b9aZJORfAjDIFq61NWvUquZ5xmKH-VcC4k/edit#heading=h.olbd4u4vk3h6 NOTE: a) Existing Font::GetStringWidth() is now obsolete and should be replaced by gfx::GetStringWidth() in ui/gfx/text_utils.h . b) 'const' has internal linkage so it doesn't require anonymous namespace (in ui/views/widget/tooltip_manager.cc). BUG=265485 TEST=Run unittests. Review URL: https://chromiumcodereview.appspot.com/23483015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220509 0039d316-1c4b-4281-b951-d872f2087c98
* Supports gfx::FontList in gfx::Canvas and ui::ElideText family.yukishiino@chromium.org2013-08-221-0/+1
| | | | | | | | | | | This is a part of the plan to support gfx::FontList in views::Label. https://docs.google.com/a/chromium.org/document/d/1D_25fp9B8b9aZJORfAjDIFq61NWvUquZ5xmKH-VcC4k/edit BUG=265485 Review URL: https://chromiumcodereview.appspot.com/22835002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218926 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in ui/.avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16175008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204885 0039d316-1c4b-4281-b951-d872f2087c98
* src/: Update the remaining include paths of string_split.h to its new location.tfarina@chromium.org2013-03-061-1/+1
| | | | | | | | | | BUG=175186 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/12473004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186462 0039d316-1c4b-4281-b951-d872f2087c98
* Makes gfx::Screen an instance, rather than a collection of static methods.scottmg@chromium.org2012-10-121-2/+3
| | | | | | | | | | | | | | This is in support of supporting separate Screen implementations on Aura for desktop and metro on Windows. Some callsites are not yet correct, and noted with a reference to the http://crbug.com/133312. As-is those sites will behave the same as before this patch, but may not be correct once desktop/metro can run simultaneously. BUG=133312 Review URL: https://chromiumcodereview.appspot.com/11030017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161644 0039d316-1c4b-4281-b951-d872f2087c98
* Change signature of |ui::ElideText()|. Add a truncate mode.asvitkine@chromium.org2011-12-121-1/+2
| | | | | | | | | | | | | | | The new truncate mode is needed by my upcoming changes to rewrite CanvasSkia::DrawText(). Part of the change is changing the binary search code to a more traditional form that also makes the truncate mode work correctly. This is covered by the new unit tests. BUG=105550 TEST=New and existing tests in text_elider_unittest.cc. Review URL: http://codereview.chromium.org/8917011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114063 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-221-0/+63
| | | | | | | | | | | BUG=104039 R=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110949 Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111077 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110949 - views: Move widget/ directory to ui/views.wez@chromium.org2011-11-211-63/+0
| | | | | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 TBR=tfarina@chromium.org Review URL: http://codereview.chromium.org/8547015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110953 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-211-0/+63
BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110949 0039d316-1c4b-4281-b951-d872f2087c98