Enable hidpi support on macOS by default

This commit is contained in:
Larry Shaffer 2017-04-29 21:21:07 +02:00
parent efe9bbb61c
commit d3ea19eaad
2 changed files with 12 additions and 0 deletions

View File

@ -304,5 +304,14 @@
<string>zh_CN</string>
<string>zh_TW</string>
</array>
<key>LSEnvironment</key>
<dict>
<key>QT_AUTO_SCREEN_SCALE_FACTOR</key>
<string>1</string>
</dict>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
</dict>
</plist>

View File

@ -783,6 +783,9 @@ int main( int argc, char *argv[] )
QgsApplication myApp( argc, argv, myUseGuiFlag, configpath );
#ifdef Q_OS_MAC
// Set hidpi icons; use SVG icons, as PNGs will be relatively too small
QCoreApplication::setAttribute( Qt::AA_UseHighDpiPixmaps );
// Set 1024x1024 icon for dock, app switcher, etc., rendering
myApp.setWindowIcon( QIcon( QgsApplication::iconsPath() + QStringLiteral( "qgis-icon-macos.png" ) ) );
#else