The tooltips displayed on content doesn't include enough padding between the border and the text. Padding should be increased to match that on the tooltips shown on the toolbar buttons. (Reported against Chimera/2002081105.) Steps to reproduce: 1. Hover over the text "Bug 155881" in bug 149635, comment 8 2. Compare with the tooltip shown by hovering over the "Home" toolbar button The toolbar tooltip has more padding than the content tooltip.
Created attachment 94877 [details] Illustration of Problem I made an anchor with the title, "Go to home page" and compared it against the tooltip for the home button to get exact details on the problem, as seen in the attached illustration. We have the correct amount of padding on the left, but we need two more pixels of padding on the top, two more on the bottom, and seven pixels less padding on the right.
Correction, we have 6px too much padding on the right in this example. Note also that I have tested this with a few other phrases, and we always have exactly 2px too little on the top and bottom, and 6px too much on the right, so this is a simple issue.
Summary: Increase padding on content tooltip text → Adjust content tooltip padding to match UI tooltips
should be easy for richard to tweak.
Assignee: saari → richards9
Yep. Thanks to Richard we have tooltips. These small adjustments and they're golden.
I should have a patch for this up soon. It's easy. One thing I would like to tweak, either now or in the future: The Aqua HIG states that the Tooltip for any given object should always be in the same spot, regardless of where the mouse is. It should be a particular number of pixels below that view, centered. Of course, you'll notice the toolbar tooltips don't do this ;) Anyhow, right now, the tooltip code provides us with the location of the mouse pointer. Anyone know how I could get the bounds of whatever object the mouse is hovering over?
Created attachment 95004 [details] [diff] [review] Fixes tooltip padding Removes 6 pixels from the right side, adds 2 to the top and bottom. The patch is huge because I also fixed the indenting for the whole file. I origonally had it set up for 4 space tabs.
Do you have a URL for that part of the HIG, Richard? We could file a bug about that for Mozilla as well.
Keywords: patch, review
<a href="http://developer.apple.com/techpubs/macosx/Essentials/AquaHIGuidelines/AHIGHelp/Help_Tags.html">Help Tags HIG</a>
no, the tooltip embedding api doesn't support that. we can rev the api, but i'm not really sure it's worth the hassle.
+ textSize.width -= 6; why does measuring the text with a text view cause the widget to be off by 6px? can you also post a diff -w so i can see exactly what's changing code-wise? thanks! I just want to be certain of what i'm looking at.
Created attachment 95130 [details] [diff] [review] diff -w, showing just the changed code The changes are fairly simple. I decrease the size given to me by Apple's calls (why is it always 6 pixels too long? I have no idea, but at least it's consistent), and I have the window draw the beige-ish background color instead of the text field (because it no longer fills the whole window).
landed with some small tweaks.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.