diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-07-24 06:51:35 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-07-24 14:44:54 +0200 |
commit | 87671a72505603a4cf9b3118c867654e788086da (patch) | |
tree | ed91889c41035cc5620db88add94128174b5d325 /vcl | |
parent | b3626b0142fc8b72d2249279c34badbb971addce (diff) |
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 <m.weghorn@posteo.de>
Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/imivctl1.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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; } |