diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-01 11:29:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-01 15:57:54 +0200 |
commit | c6985f1c2a3fd739f4c024bda52aefd061b1a583 (patch) | |
tree | 30f752c71cb73ba1a9b0d10119cfc6b25aa88e7a | |
parent | 3ebdb97a305ada182af045ea6438432adfe74e80 (diff) |
use drawing area font for preview
Change-Id: Ibebf128c1db3a3bfb59c47624e16e6bf2d47b652
Reviewed-on: https://gerrit.libreoffice.org/70051
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 7626a0c3972e..ba5dfd625a5b 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -37,6 +37,7 @@ #include <vcl/event.hxx> #include <vcl/settings.hxx> #include <vcl/builderfactory.hxx> +#include <vcl/svapp.hxx> #include <sfx2/passwd.hxx> @@ -622,6 +623,9 @@ void AddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rect rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), GetOutputSizePixel())); Color aPaintColor(IsEnabled() ? rSettings.GetWindowTextColor() : rSettings.GetDisableColor()); rRenderContext.SetLineColor(aPaintColor); + + if (vcl::Window* pDefaultDevice = dynamic_cast<vcl::Window*>(Application::GetDefaultDevice())) + pDefaultDevice->SetPointFont(rRenderContext, GetDrawingArea()->get_font()); vcl::Font aFont(rRenderContext.GetFont()); aFont.SetColor(aPaintColor); rRenderContext.SetFont(aFont); |