mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 524919 - Qt build of Firefox or Fennec does not respect my screen's DPI. r=mark.finkle, sr=pavlov
This commit is contained in:
parent
b3d57c6226
commit
5ca249e433
@ -135,6 +135,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
static gfxFontconfigUtils *sFontconfigUtils;
|
static gfxFontconfigUtils *sFontconfigUtils;
|
||||||
|
void InitDisplayCaps();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual qcms_profile *GetPlatformCMSOutputProfile();
|
virtual qcms_profile *GetPlatformCMSOutputProfile();
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QX11Info>
|
#include <QX11Info>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QWidget>
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
#include "gfxQtPlatform.h"
|
#include "gfxQtPlatform.h"
|
||||||
|
|
||||||
@ -583,3 +583,12 @@ gfxQtPlatform::SetPrefFontEntries(const nsCString& aKey, nsTArray<nsRefPtr<gfxFo
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
gfxQtPlatform::InitDisplayCaps()
|
||||||
|
{
|
||||||
|
QDesktopWidget* rootWindow = qApp->desktop();
|
||||||
|
sDPI = rootWindow->logicalDpiY(); // y-axis DPI for fonts
|
||||||
|
if (sDPI <= 0)
|
||||||
|
sDPI = 96; // something more sensible
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user