prefix pdf dpi issue

preferencesAboutTextFull
Didier Clerc 12 years ago
parent 2773998713
commit 31b1ba0a77
  1. 6
      src/pdf/PDFRenderer.cpp

@ -14,12 +14,14 @@
*/ */
#include <QFile> #include <QFile>
#include <QDesktopWidget>
#include "PDFRenderer.h" #include "PDFRenderer.h"
#include "XPDFRenderer.h" #include "XPDFRenderer.h"
#include "core/memcheck.h" #include "core/memcheck.h"
#include "core/UBApplication.h"
QMap< QUuid, QPointer<PDFRenderer> > PDFRenderer::sRenderers; QMap< QUuid, QPointer<PDFRenderer> > PDFRenderer::sRenderers;
@ -52,6 +54,10 @@ PDFRenderer* PDFRenderer::rendererForUuid(const QUuid &uuid, const QString &file
sRenderers.insert(newRenderer->fileUuid(), newRenderer); sRenderers.insert(newRenderer->fileUuid(), newRenderer);
QDesktopWidget* desktop = UBApplication::desktop();
int dpiCommon = (desktop->physicalDpiX() + desktop->physicalDpiY()) / 2;
newRenderer->setDPI(dpiCommon);
return newRenderer; return newRenderer;
} }
} }

Loading…
Cancel
Save