diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-08-23 10:12:45 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-29 16:46:11 +0200 |
commit | b8bf10d8123276cd9b9cb73f4fc595bba8d29c2f (patch) | |
tree | c3254d732d4c8dca24023f01b865e49a60480bf4 /vcl/source | |
parent | 20e46a6ca5b62f7177f799eae9e0f26e659fd03b (diff) |
tdf#119477 fix list box focused text color
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 <glogow@fbihome.de>
(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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 10 |
1 files 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 |