Skip to content

Commit

Permalink
try to get DPI with new QScreen API
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Oct 7, 2013
1 parent da6f621 commit f60feb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions all.h
Expand Up @@ -140,6 +140,7 @@
#include <QSpacerItem>
#include <QGraphicsSceneMouseEvent>
#include <QtConcurrent>
#include <QScreen>

#include <QSvgRenderer>
#include <QSvgGenerator>
Expand Down
4 changes: 2 additions & 2 deletions mscore/musescore.cpp
Expand Up @@ -4765,8 +4765,8 @@ int main(int argc, char* av[])

QNetworkProxyFactory::setUseSystemConfiguration(true);

QWidget wi(0);
MScore::PDPI = wi.physicalDpiX(); // physical resolution
QScreen* screen = QGuiApplication::primaryScreen();
MScore::PDPI = screen->physicalDotsPerInch(); // physical resolution
MScore::DPI = MScore::PDPI; // logical drawing resolution
MScore::init(); // initialize libmscore

Expand Down

0 comments on commit f60feb6

Please sign in to comment.