Skip to content

Commit d3ea19e

Browse files
committedApr 29, 2017
Enable hidpi support on macOS by default
1 parent efe9bbb commit d3ea19e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
 

‎mac/app.info.plist.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,5 +304,14 @@
304304
<string>zh_CN</string>
305305
<string>zh_TW</string>
306306
</array>
307+
<key>LSEnvironment</key>
308+
<dict>
309+
<key>QT_AUTO_SCREEN_SCALE_FACTOR</key>
310+
<string>1</string>
311+
</dict>
312+
<key>NSPrincipalClass</key>
313+
<string>NSApplication</string>
314+
<key>NSHighResolutionCapable</key>
315+
<string>True</string>
307316
</dict>
308317
</plist>

‎src/app/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,9 @@ int main( int argc, char *argv[] )
783783
QgsApplication myApp( argc, argv, myUseGuiFlag, configpath );
784784

785785
#ifdef Q_OS_MAC
786+
// Set hidpi icons; use SVG icons, as PNGs will be relatively too small
787+
QCoreApplication::setAttribute( Qt::AA_UseHighDpiPixmaps );
788+
786789
// Set 1024x1024 icon for dock, app switcher, etc., rendering
787790
myApp.setWindowIcon( QIcon( QgsApplication::iconsPath() + QStringLiteral( "qgis-icon-macos.png" ) ) );
788791
#else

0 commit comments

Comments
 (0)
Please sign in to comment.