Skip to content

Commit

Permalink
Enable hidpi support on macOS by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Apr 29, 2017
1 parent efe9bbb commit d3ea19e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mac/app.info.plist.in
Expand Up @@ -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>
3 changes: 3 additions & 0 deletions src/app/main.cpp
Expand Up @@ -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
Expand Down

0 comments on commit d3ea19e

Please sign in to comment.