diff options
author | Arnaud Versini <arnaud.versini@libreoffice.org> | 2020-01-30 16:00:17 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-31 11:34:10 +0100 |
commit | 56eb50de018ac806f92e2dd76c698d54edfe6122 (patch) | |
tree | d0bd3008dbf5b94a7c5273d7a6781114064456ad /vcl/source/control/spinfld.cxx | |
parent | dff7a46fb46d1fa2a3ad674ee493ae2d59150fe3 (diff) |
tdf#83248 Print using the right color for other components too.
PDF and printed documents should be the same.
Change-Id: I34f43688f4ec8945c65a414bc0d955dea45dc9b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87761
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/spinfld.cxx')
-rw-r--r-- | vcl/source/control/spinfld.cxx | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 263af6f90179..20596fef23e9 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -968,22 +968,11 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - OutDevType eOutDevType = pDev->GetOutDevType(); AllSettings aOldSettings = pDev->GetSettings(); pDev->Push(); pDev->SetMapMode(); - if (eOutDevType == OUTDEV_PRINTER) - { - StyleSettings aStyleSettings = aOldSettings.GetStyleSettings(); - aStyleSettings.SetFaceColor(COL_LIGHTGRAY); - aStyleSettings.SetButtonTextColor(COL_BLACK); - AllSettings aSettings(aOldSettings); - aSettings.SetStyleSettings(aStyleSettings); - pDev->SetSettings(aSettings); - } - tools::Rectangle aDD, aUp, aDown; ImplCalcButtonAreas(pDev, aSize, aDD, aUp, aDown); aDD.Move(aPos.X(), aPos.Y()); @@ -992,7 +981,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D aDown.Move(aPos.X(), aPos.Y()); Color aButtonTextColor; - if ((nFlags & DrawFlags::Mono) || (eOutDevType == OUTDEV_PRINTER)) + if (nFlags & DrawFlags::Mono) aButtonTextColor = COL_BLACK; else aButtonTextColor = GetSettings().GetStyleSettings().GetButtonTextColor(); |