зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1821331 - For macOS printing, ensure paper orientation matches the dimensions being set. r=emilio
Depends on D174243 Differential Revision: https://phabricator.services.mozilla.com/D174244
This commit is contained in:
Родитель
d70ae79d9f
Коммит
89c7f7e5c3
|
@ -106,15 +106,18 @@ NSPrintInfo* nsPrintSettingsX::CreateOrCopyPrintInfo(bool aWithScaling) {
|
|||
|
||||
NSSize paperSize;
|
||||
if (GetSheetOrientation() == kPortraitOrientation) {
|
||||
[printInfo setOrientation:NSPaperOrientationPortrait];
|
||||
paperSize.width = CocoaPointsFromPaperSize(mPaperWidth);
|
||||
paperSize.height = CocoaPointsFromPaperSize(mPaperHeight);
|
||||
[printInfo setPaperSize:paperSize];
|
||||
} else {
|
||||
[printInfo setOrientation:NSPaperOrientationLandscape];
|
||||
paperSize.width = CocoaPointsFromPaperSize(mPaperHeight);
|
||||
paperSize.height = CocoaPointsFromPaperSize(mPaperWidth);
|
||||
[printInfo setPaperSize:paperSize];
|
||||
}
|
||||
[printInfo setPaperSize:paperSize];
|
||||
|
||||
if (paperSize.width > paperSize.height) {
|
||||
[printInfo setOrientation:NSPaperOrientationLandscape];
|
||||
} else {
|
||||
[printInfo setOrientation:NSPaperOrientationPortrait];
|
||||
}
|
||||
|
||||
[printInfo setTopMargin:mUnwriteableMargin.top];
|
||||
|
|
Загрузка…
Ссылка в новой задаче