diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-23 15:47:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-23 19:02:10 +0100 |
commit | ea1600eb54fac1ac980339535e25cce00f59b711 (patch) | |
tree | 150b9658d1b00abe52a7011cbd40e9472198e802 /chart2/source/controller/main | |
parent | 8f5d8669ca74fed8608e438a8436c173e35d43a6 (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 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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source/controller/main')
-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 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); } } |