include/svtools/valueset.hxx | 1 - svtools/source/control/valueset.cxx | 23 +++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-)
New commits: commit eccd817127d852df98df173513a5c8d91c68e2c8 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Oct 26 11:47:15 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Oct 27 13:59:37 2021 +0200 don't second guess the theme colors in valuesets Change-Id: Ie13242800c9a171a93d266601fed11bf2d62f942 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124209 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 98e701800f04..3fd4c0b12b18 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -218,7 +218,6 @@ private: bool mbHighlight : 1; bool mbNoSelection : 1; bool mbDrawSelection : 1; - bool mbBlackSel : 1; bool mbDoubleSel : 1; bool mbScroll : 1; bool mbFullMode : 1; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 75665ddd2654..f50f7dc01886 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -98,7 +98,6 @@ ValueSet::ValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow) mnFrameStyle = DrawFrameStyle::NONE; mbNoSelection = true; mbDrawSelection = true; - mbBlackSel = false; mbDoubleSel = false; mbScroll = false; mbFullMode = true; @@ -1044,22 +1043,6 @@ void ValueSet::Format(vcl::RenderContext const & rRenderContext) else mnFrameStyle = DrawFrameStyle::In; - // determine selected color and width - // if necessary change the colors, to make the selection - // better detectable - const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Color aHighColor(rStyleSettings.GetHighlightColor()); - if (((aHighColor.GetRed() > 0x80) || (aHighColor.GetGreen() > 0x80) || - (aHighColor.GetBlue() > 0x80)) || - ((aHighColor.GetRed() == 0x80) && (aHighColor.GetGreen() == 0x80) && - (aHighColor.GetBlue() == 0x80))) - { - mbBlackSel = true; - } - else - { - mbBlackSel = false; - } // draw the selection with double width if the items are bigger if ((nStyle & WB_DOUBLEBORDER) && ((mnItemWidth >= 25) && (mnItemHeight >= 20))) @@ -1276,7 +1259,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt InvertFocusRect(rRenderContext, aRect); if (bDrawSel) { - rRenderContext.SetLineColor(mbBlackSel ? COL_BLACK : aDoubleColor); + rRenderContext.SetLineColor(aDoubleColor); rRenderContext.DrawRect(aRect); } } @@ -1284,7 +1267,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt { if (bDrawSel) { - rRenderContext.SetLineColor(mbBlackSel ? COL_BLACK : aDoubleColor); + rRenderContext.SetLineColor(aDoubleColor); rRenderContext.DrawRect(aRect); } if (mbDoubleSel) @@ -1319,7 +1302,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt if (bDrawSel) { - rRenderContext.SetLineColor(mbBlackSel ? COL_WHITE : aSingleColor); + rRenderContext.SetLineColor(aSingleColor); } else {