-
Notifications
You must be signed in to change notification settings - Fork 1k
Prevent Toolbar tooltips from appearing directly under cursor hotspot #12959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12959 +/- ##
===================================================
+ Coverage 62.15778% 62.24890% +0.09111%
===================================================
Files 1555 1557 +2
Lines 159256 159251 -5
Branches 14849 14864 +15
===================================================
+ Hits 98990 99132 +142
+ Misses 59522 59367 -155
- Partials 744 752 +8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
@@ -4505,6 +4505,7 @@ internal void UpdateToolTip(ToolStripItem? item, bool refresh = false) | |||
if (_currentlyActiveTooltipItem is not null && !GetToolStripState(STATE_DRAGGING) && Cursor.Current is { } currentCursor) | |||
{ | |||
Point cursorLocation = Cursor.Position; | |||
cursorLocation.X += currentCursor.HotSpot.X + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth putting a comment here explaining why the X coordinate is being fudged
@Olina-Zhang can your team build this fix and test it out? And can you (or @LeafShi1 ) update the PR branch so it's up to date? |
1656019
to
977557a
Compare
@merriemcgaw @toehead2001 Tested this PR change, here is the result, please have a look:
WithPrivates_Case1Fixed.mp4
WithPrivates_Case2NotFixed.mp4 |
src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs
Show resolved
Hide resolved
@Olina-Zhang - did issue2 become worse after the fix? |
No, same result as before. |
@merriemcgaw @Olina-Zhang - I think the second issue is minor and can be ignored, especially since it didn't get worse with this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixes #12958
Proposed changes
ToolTip
so that it is offset by 1px from the cursor's HotSpot X value.Customer Impact
ToolStrip
tooltips from appearing directly under cursor HotSpot. Thus, the user is able to click theToolStripItem
.Regression?
Risk
Screenshots
Before
After
Test methodology
Accessibility testing
Test environment(s)
Microsoft Reviewers: Open in CodeFlow