chart2/source/controller/main/ChartWindow.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit ea1600eb54fac1ac980339535e25cce00f59b711 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 23 15:47:22 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 23 19:02:10 2022 +0100 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 while 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/+/130442 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index b3d2c8db4df6..3085f65da43c 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -209,7 +209,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; @@ -218,12 +217,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); } }