summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/gdi/aquaprintaccessoryview.mm')
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 74c66ab1401d..d00fc9a6cd0e 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -318,6 +318,12 @@ class ControllerProperties
double fScaleX = double(aLogicSize.Width())/double(aPageSize.aSize.Width());
double fScaleY = double(aLogicSize.Height())/double(aPageSize.aSize.Height());
double fScale = (fScaleX < fScaleY) ? fScaleX : fScaleY;
+ // #i104784# if we render the page too small then rounding issues result in
+ // layout artifacts looking really bad. So scale the page unto a device that is not
+ // full page size but not too small either. This also results in much better visual
+ // quality of the preview, e.g. when its height approaches the number of text lines
+ if( fScale < 0.1 )
+ fScale = 0.1;
aMtf.WindStart();
aMtf.Scale( fScale, fScale );
aMtf.WindStart();
@@ -358,9 +364,10 @@ class ControllerProperties
NSSize aMargins = [mpPreviewBox contentViewMargins];
aPreviewFrame.origin.x = 0;
aPreviewFrame.origin.y = 34;
+ aPreviewFrame.size.width -= 2*(aMargins.width+1);
aPreviewFrame.size.height -= 61;
mpPreview = [[NSImageView alloc] initWithFrame: aPreviewFrame];
- [mpPreview setImageScaling: NSScaleNone];
+ [mpPreview setImageScaling: NSScaleProportionally];
[mpPreview setImageAlignment: NSImageAlignCenter];
[mpPreview setImageFrameStyle: NSImageFrameNone];
[mpPreviewBox addSubview: [mpPreview autorelease]];