diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-26 11:47:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-27 13:59:37 +0200 |
commit | eccd817127d852df98df173513a5c8d91c68e2c8 (patch) | |
tree | ed0b07e11b7a759dfb974d50f6fa38d372bcb15e /svtools/source/control | |
parent | 71b227dfa46fbc9fbf9b9f2046705939ab0a02bf (diff) |
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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/valueset.cxx | 23 |
1 files changed, 3 insertions, 20 deletions
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 { |