From b8bf10d8123276cd9b9cb73f4fc595bba8d29c2f Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Thu, 23 Aug 2018 10:12:45 +0200 Subject: tdf#119477 fix list box focused text color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ignores the rollover state for text colors if the list box has the focus and just uses the highlight text color. The normal text color is a result from commit 9897fd1c4715 ("Fix list box focused text color"), which makes the highlighted list box text "invisible" (black on dark blue) in the "gen" VCL plugin and on Windows, e.g. when the focus is in the Math symbol list box. Reviewed-on: https://gerrit.libreoffice.org/59488 Reviewed-on: https://gerrit.libreoffice.org/59549 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 7a14326fea2cc317b8be57d45be7ca57aebd8bdd) (cherry picked from commit 9897fd1c4715e7dbbe99fae2b82c2eda1d2b6f7e) Change-Id: I751a811f2e2bbca112b8f9e0de2fffb04c437ba4 Reviewed-on: https://gerrit.libreoffice.org/59564 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/source/control/imp_listbox.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 32a82b1ac2cf..b2e002a05ef5 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2683,18 +2683,16 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout) if (bHasFocus && !ImplGetSVData()->maNWFData.mbDDListBoxNoTextArea) { if ( !ImplGetSVData()->maNWFData.mbNoFocusRects ) + { rRenderContext.SetFillColor( rStyleSettings.GetHighlightColor() ); + rRenderContext.SetTextColor( rStyleSettings.GetHighlightTextColor() ); + } else { rRenderContext.SetLineColor(); rRenderContext.SetFillColor(); + rRenderContext.SetTextColor( rStyleSettings.GetFieldTextColor() ); } - Color aColor; - if( bNativeOK && (nState & ControlState::ROLLOVER) ) - aColor = rStyleSettings.GetFieldRolloverTextColor(); - else - aColor = rStyleSettings.GetFieldTextColor(); - rRenderContext.SetTextColor( aColor ); rRenderContext.DrawRect( maFocusRect ); } else -- cgit