diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-15 13:25:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-15 20:36:15 +0100 |
commit | 1a137ef35d67a4aff7b2a6f1d3aa3c944c7a0b41 (patch) | |
tree | a58438c531649ae9fb513e57bb6e7612b5df7eb0 /vcl/source/window | |
parent | 9dceb75ec9af78df6f683443c7f4008076412903 (diff) |
tdf#128495 measure preferred size of print preview relative to UI font
Change-Id: If04f50818fc94dd62263daaebc1c386b2d85c987
Reviewed-on: https://gerrit.libreoffice.org/82790
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/printdlg.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 7750baf5039d..4a7105a777c9 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -145,6 +145,13 @@ void PrintDialog::PrintPreviewWindow::Resize() preparePreviewBitmap(); } +void PrintDialog::PrintPreviewWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) +{ + pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 55, + pDrawingArea->get_text_height() * 40); + CustomWidgetController::SetDrawingArea(pDrawingArea); +} + void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.Push(); |