summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2022-10-18 18:43:59 +0200
committerRafael Lima <rafael.palma.lima@gmail.com>2022-11-09 16:07:13 +0100
commitaa8a8b36b73304431bacd7ed0f8803de8dfffe3e (patch)
tree49c0a338cac310dc2d42c00f03dae1ec344f886a /svtools/source
parent2c8a760a18501acaa6e4ff2a2dee76b0bad275f1 (diff)
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.tietze@documentfoundation.org>
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/control/ruler.cxx4
1 files changed, 3 insertions, 1 deletions
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)
{