include/vcl/outdev.hxx | 1 + include/vcl/print.hxx | 1 + vcl/source/window/decoview.cxx | 5 +---- 3 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit c39738eabfb9edde552832581bf85e717b00cc79 Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Sun May 24 00:49:27 2020 +1000 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Thu Jun 4 18:36:05 2020 +0200 tdf#74702 vcl: extract GetMonochromeButtonColor() Change-Id: I67e430ae1e0834f087a2066ed7bf660ec1309a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94726 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 18c47547d44a..86c18f06782e 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -537,6 +537,7 @@ public: public: virtual Size GetButtonBorderSize() { return Size(1, 1); }; + virtual Color GetMonochromeButtonColor() { return COL_WHITE; } /** @name Direct OutputDevice drawing functions */ diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index 6e0fd0d15c76..2e72240d42c0 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -241,6 +241,7 @@ public: const Gradient& rGradient ); virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override; virtual Size GetButtonBorderSize() override; + virtual Color GetMonochromeButtonColor() override { return COL_LIGHTGRAY; } bool IsScreenComp() const override { return false; } diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 2d418a0ad486..fab8f183ca9d 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -509,10 +509,7 @@ void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect, } // Hack: in monochrome mode on printers we like to have grey buttons - if ( pDev->GetOutDevType() == OUTDEV_PRINTER ) - pDev->SetFillColor( COL_LIGHTGRAY ); - else - pDev->SetFillColor( COL_WHITE ); + pDev->SetFillColor(pDev->GetMonochromeButtonColor()); pDev->DrawRect( aFillRect ); } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits