svtools/source/control/valueset.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 73e307eb0c7811b84b6fb72f3241ea91a0b760ff Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Mar 2 16:51:41 2023 +0000 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Thu Mar 9 12:34:58 2023 +0000 Resolves: tdf#153787 highlighted entry text overdraws selected entry text Change-Id: Iabf1d4a672aa508c5143f12169678278186ddd47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148099 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 96f940555965..0da10bfda9e2 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1515,6 +1515,9 @@ void ValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUStri nTxtOffset += NAME_LINE_HEIGHT+NAME_LINE_OFF_Y; rRenderContext.SetTextColor(Application::GetSettings().GetStyleSettings().GetButtonTextColor()); + // tdf#153787 highlighted entry text is drawn in the same Paint as the selected text, so can + // overwrite already rendered text + rRenderContext.Erase(tools::Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); rRenderContext.DrawText(Point((aWinSize.Width() - nTxtWidth) / 2, nTxtOffset + (NAME_OFFSET / 2)), rText); rRenderContext.Pop();