svtools/source/control/valueset.cxx |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit abccf22947294cfc2d9c4b727b7fd059bed55f0b
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Tue Apr 30 10:23:34 2024 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Mon May 6 16:26:13 2024 +0200

    Resolves tdf#136917 - Focus rectangle barely visible on toolbar widgets
    
    eg. Toggle Unordered List
    
    Change-Id: I9298fcbcbf715402a59c7a8ccaa2cd341e7cda8b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166916
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index 0127ea7a1901..58364b4aebfc 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -29,6 +29,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/virdev.hxx>
+#include <vcl/lineinfo.hxx>
 
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
@@ -1255,9 +1256,15 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& 
rRenderContext,
         if (bDrawSel)
         {
             rRenderContext.SetLineColor(aDoubleColor);
-            tools::PolyPolygon aPolyPoly(1);
-            aPolyPoly.Insert(tools::Polygon(aRect));
-            rRenderContext.DrawTransparent(aPolyPoly, nTransparencePercent);
+            aRect.AdjustLeft( -1 );
+            aRect.AdjustTop( -1 );
+            aRect.AdjustRight( -2 );
+            aRect.AdjustBottom( -2 );
+
+            const tools::Polygon aPoly(aRect);
+            LineInfo aLineInfo;
+            aLineInfo.SetWidth(3);
+            rRenderContext.DrawPolyLine(aPoly, aLineInfo); // tdf#136917
         }
     }
     else
@@ -1343,6 +1350,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& 
rRenderContext,
                     rRenderContext.SetLineColor(aSingleColor);
                 else
                     rRenderContext.SetLineColor(COL_LIGHTGRAY);
+
                 rRenderContext.DrawRect(aFocusRect);
             }
         }

Reply via email to