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

New commits:
commit 2e9122f79b2573647a77bdfb2216934a5abda778
Author:     Rafael Lima <[email protected]>
AuthorDate: Tue Oct 18 18:43:59 2022 +0200
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Wed Nov 9 21:08:47 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 <[email protected]>
    (cherry picked from commit aa8a8b36b73304431bacd7ed0f8803de8dfffe3e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142448
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 07e030aac109..89164e6ed8f2 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