diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-23 15:47:22 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-02-27 10:38:55 +0100 |
commit | 457bdfe7cc83598f55720555d597940400fd0535 (patch) | |
tree | 8421e41b9bff2877bc7761c1cdec4eff0b6a089f | |
parent | 30140f9e1b3ade65d3e1cfe30d0a0ea0d076a862 (diff) |
Resolves: tdf#147292 the area of the tooltip is wrong
gen happens to make use of the current mouse point so it gets shown
anyway which gtk uses the designated area which isn't in the expected
units or screen relative positions
Change-Id: I11fdb09ad4ce2965d2f2e27fb1427c9d93de7a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130385
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r-- | chart2/source/controller/main/ChartWindow.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 9f1ff9342c98..f90bd046ac65 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -204,7 +204,6 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt ) if( ( rHEvt.GetMode() & HelpEventMode::QUICK ) && m_pWindowController ) { -// Point aLogicHitPos = PixelToLogic( rHEvt.GetMousePosPixel()); // old chart: GetPointerPosPixel() Point aLogicHitPos = PixelToLogic( GetPointerPosPixel()); OUString aQuickHelpText; awt::Rectangle aHelpRect; @@ -213,12 +212,14 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt ) if( bHelpHandled ) { + tools::Rectangle aPixelRect(LogicToPixel(lcl_AWTRectToVCLRect(aHelpRect))); + tools::Rectangle aScreenRect(OutputToScreenPixel(aPixelRect.TopLeft()), + OutputToScreenPixel(aPixelRect.BottomRight())); + if( bIsBalloonHelp ) - Help::ShowBalloon( - this, rHEvt.GetMousePosPixel(), lcl_AWTRectToVCLRect( aHelpRect ), aQuickHelpText ); + Help::ShowBalloon(this, rHEvt.GetMousePosPixel(), aScreenRect, aQuickHelpText); else - Help::ShowQuickHelp( - this, lcl_AWTRectToVCLRect( aHelpRect ), aQuickHelpText ); + Help::ShowQuickHelp(this, aScreenRect, aQuickHelpText); } } |