svtools/source/control/ruler.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit aa8a8b36b73304431bacd7ed0f8803de8dfffe3e
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Tue Oct 18 18:43:59 2022 +0200
Commit:     Rafael Lima <rafael.palma.l...@gmail.com>
CommitDate: Wed Nov 9 16:07:13 2022 +0100

    tdf#151519 Make ticks in ruler visible again
    
    As reported by the user, the ticks in the ruler are no longer visible. This 
patch draws them using the shadow color.
    
    Tested with: gen, gtk3 and kf5
    
    Change-Id: Ie80255544b88adfc331fac1365ce381dd90187cd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141407
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 340d29b27cfc..6ddac0ccd7d3 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -417,6 +417,7 @@ void Ruler::ImplInvertLines(vcl::RenderContext& 
rRenderContext)
 
 void Ruler::ImplDrawTicks(vcl::RenderContext& rRenderContext, tools::Long 
nMin, tools::Long nMax, tools::Long nStart, tools::Long nTop, tools::Long 
nBottom)
 {
+    const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
     double nCenter = nTop + ((nBottom - nTop) / 2);
 
     tools::Long nTickLength3 = (nBottom - nTop) * 0.5;
@@ -523,7 +524,7 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& 
rRenderContext, tools::Long nMin,
     }
     else
     {
-        
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetShadowColor());
+        rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
     }
 
     if (bNoTicks)
@@ -576,6 +577,7 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& 
rRenderContext, tools::Long nMin,
             double aStep = nTick / nTick4;
             double aRest = std::abs(aStep - std::floor(aStep));
             double nAcceptanceDelta = 0.0001;
+            rRenderContext.SetFillColor(rStyleSettings.GetShadowColor());
 
             if (aRest < nAcceptanceDelta)
             {

Reply via email to