mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00: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
ed18d75aab
commit
1342a5a01f
@ -135,6 +135,7 @@ public:
|
||||
|
||||
protected:
|
||||
static gfxFontconfigUtils *sFontconfigUtils;
|
||||
void InitDisplayCaps();
|
||||
|
||||
private:
|
||||
virtual qcms_profile *GetPlatformCMSOutputProfile();
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <QPixmap>
|
||||
#include <QX11Info>
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
#include "gfxQtPlatform.h"
|
||||
|
||||
@ -583,3 +583,12 @@ gfxQtPlatform::SetPrefFontEntries(const nsCString& aKey, nsTArray<nsRefPtr<gfxFo
|
||||
}
|
||||
#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