summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-13 16:55:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-11-14 10:51:14 +0100
commit05b279e7e0773d3c3da2688a2b95edfb8c88308c (patch)
treed33d5212c08ae08d5c940067befc8aa656005aab
parent8fe325c9e584d2b60875106858162e28d22d9020 (diff)
tdf#136336 ensure tooltip area surrounds the current mouse position
with at least a pixel margin Change-Id: I74935f0275863cfd5a799927034d0a31dae073cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105800 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index 0ffe30e41044..18003f48bb99 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -365,6 +365,13 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
aRect.SetRight( aPt.X() );
aRect.SetBottom( aPt.Y() );
+ // tdf#136336 ensure tooltip area surrounds the current mouse position with at least a pixel margin
+ aRect.Union(tools::Rectangle(rEvt.GetMousePosPixel(), Size(1, 1)));
+ aRect.AdjustLeft(-1);
+ aRect.AdjustRight(1);
+ aRect.AdjustTop(-1);
+ aRect.AdjustBottom(1);
+
if( bBalloon )
Help::ShowBalloon( this, rEvt.GetMousePosPixel(), aRect, sText );
else