diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-03 20:52:25 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-04 00:40:50 +0200 |
commit | 427371814dc96ae7798a607de5eb9565d7a023f0 (patch) | |
tree | 54cc4cd30e57ef723816f08493ef6a2ea179e468 /vcl/source | |
parent | 3800ab58355385dcb482d3089accc7ce141f5ee9 (diff) |
tdf#163225 vcl: Erase listbox bg when redrawing on mouse move
Somehow, moving the listbox invalidation code from
ImplWin::PreNotify to ListBox::PreNotify in
commit fd7cb42f7d17d03e4fac6d8c5f1d6c7c49a36fc6
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Feb 14 16:16:30 2023 +0100
tdf#153520 vcl: Align listbox invalidation with mouseover check
triggered rendering artifacts for the tdf#163225 listbox example.
It seems that the previous rendering operation apparently seems a
pixel or so off from the current one and as the InvalidateFlags::NoErase
flag gets passed, what was drawn previously is not erased.
Don't pass that flag any more to ensure that the background is
properly erased, which fixes the rendering artifacts.
The flag's docmentation says:
/** The invalidated area is painted with the background color/pattern. */
NoErase = 0x0004,
Dropping the flag doesn't negatively affect drawing a listbox
that has an explicit background color set in my tests, s. modified
sample document attachment 196871 in tdf#163225 .
Stop passing that flag in ListBox::StateChanged, too.
Change-Id: Ibcacbed01888449db062f84b4782feb9de69851c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174438
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/listbox.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 81e9eafdc33e..beaa0cc19c06 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -721,7 +721,7 @@ void ListBox::StateChanged( StateChangedType nType ) if ( IsNativeControlSupported(ControlType::Listbox, ControlPart::Entire) && ! IsNativeControlSupported(ControlType::Listbox, ControlPart::ButtonDown) ) { - GetWindow( GetWindowType::Border )->Invalidate( InvalidateFlags::NoErase ); + GetWindow(GetWindowType::Border)->Invalidate(); } else mpImplWin->Invalidate(); @@ -894,7 +894,7 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt ) if (IsNativeControlSupported(ControlType::Listbox, ControlPart::Entire) && !IsNativeControlSupported(ControlType::Listbox, ControlPart::ButtonDown)) { - GetWindow(GetWindowType::Border)->Invalidate(InvalidateFlags::NoErase); + GetWindow(GetWindowType::Border)->Invalidate(); } } } |