From 87671a72505603a4cf9b3118c867654e788086da Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 24 Jul 2024 06:51:35 +0200 Subject: tdf#161501 icon choice ctrl: Stop hover-highlight when mouse leaves When the mouse leaves the vertical tab bar, unset the entry to highlight as mouse-hovered, as the previously one no longer is when the mouse is outside the area of the tab bar. This fixes the issue of the previously mouse-hovered entry still being painted with mouse-hover feedback when slowly moving the mouse to the right away from an entry in the "Insert" -> "Page Style" dialog with gen or kf5 at least, as shown in attachment 195467 of tdf#161501. Change-Id: I646cab54f5031ed6a8aa88d4a162bb3a2456eec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170923 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- vcl/source/control/imivctl1.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index ed4c2faa8abe..8a6ace9c6adb 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -494,8 +494,12 @@ bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt ) if( pView->IsTracking() ) return false; - const Point aDocPos(pView->PixelToLogic(rMEvt.GetPosPixel())); - SvxIconChoiceCtrlEntry* pEntry = GetEntry(aDocPos); + SvxIconChoiceCtrlEntry* pEntry = nullptr; + if (!rMEvt.IsLeaveWindow()) + { + const Point aDocPos(pView->PixelToLogic(rMEvt.GetPosPixel())); + pEntry = GetEntry(aDocPos); + } SetEntryHighlightFrame(pEntry); return true; } -- cgit