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 | |
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')
-rw-r--r-- | vcl/source/control/combobox.cxx | 3 | ||||
-rw-r--r-- | vcl/source/control/listbox.cxx | 3 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 13 |
3 files changed, 3 insertions, 16 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 61d31a6333ef..3fac924ea4d6 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1156,7 +1156,6 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); vcl::Font aFont = m_pImpl->m_pImplLB->GetMainWindow()->GetDrawPixelFont( pDev ); - OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); pDev->SetMapMode(); @@ -1202,7 +1201,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D else nTextStyle |= DrawTextFlags::Left; - if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( nFlags & DrawFlags::Mono ) { pDev->SetTextColor( COL_BLACK ); } diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 8772fb40db8d..9b66451b37ed 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -329,7 +329,6 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); vcl::Font aFont = mpImplLB->GetMainWindow()->GetDrawPixelFont( pDev ); - OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); pDev->SetMapMode(); @@ -356,7 +355,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr } // Content - if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( nFlags & DrawFlags::Mono ) { pDev->SetTextColor( COL_BLACK ); } 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(); |